-- This works but gives me LATEST_STATE of 45 on all rows AddColumns(Sort(TABLE_A,UPDATED_ON,Descending),"MyDemoColumn",First(Sort(Filter(TABLE_B,PRIMARY_ID = 45),UPDATED_ON,Descending)).LATEST_STATE)
-- This does not AddColumns(Sort(TABLE_A,UPDATED_ON,Descending),"MyDemoColumn",First(Sort(Filter(TABLE_B,PRIMARY_ID = TABLE_A[@PRIMARY_ID]),UPDATED_ON,Descending)).LATEST_STATE)
where TABLE_B has a foreign key reference to table a (Many to One)
Is my syntax incorrect while using the @
Updated 8/25 I also tried the following. It works but gives me wrong values AddColumns(Sort(TABLE_A,UPDATED_ON,Descending),"MyDemoColumn",First(Sort(Filter(TABLE_B,PRIMARY_ID = ThisRecord.PRIMARY_ID),UPDATED_ON,Descending)).LATEST_STATE)