Forum Discussion
Anonymous
5 years agoNot applicable
Power BI : Lookup Calculated Field
Hi, I need to create a calculated column (not a measure) which first filters the table based on few conditions and then give me the column value corresponding to the row which has survived all the fi...
- 5 years ago
Anonymous
maybe you can try this
Column = VAR _date=MINX(FILTER('table2',table2[Date]>=table1[Document upload Date]&&table1[APPID]=table2[APPID]),'table2'[Date]) return MAXX(FILTER('table2','table1'[APPID]='table2'[APPID]&&'table2'[Date]=_date),'table2'[Previous Stage])
amitchandak
5 years agoSuper User
Anonymous , Try a new column in table1
maxx(filter(Table2, Table2[Date] >=Table1[date] && Table1[AppID] = Table2[AppID]), firstnonblankvalue(Table2[Date], Table2[Stage]))
Anonymous
5 years agoNot applicable
Thank you amitchandak for the quick reply, but somehow your DAX is giving me the status corresponding to the 2nd highest date instead of MAX date. Not sure why but your logic also seemed correct.