Forum Discussion
Anonymous
8 years agoNot applicable
SELECT MAX(Date) FROM Source WHERE {Reference_Column] IS NOT NULL
How can I accomplish the above T-SQL statement in Power BI? I have a table with 4 Columns (Date, Name, Age, Gender) to keep track of who led which training session by date (thats obviously not th...
- Anonymous8 years ago
For anyone with the same issue.
I ended up putting an IF statement into a custom column on the table which checks to see if my reference column has a value, if so it is populated with the corresponding date in that row, if not it is populated with null. After that I used a MAX() function in a measure to get the latest available date from my new column and used that measure in a visual level filter.
It feels like a long way to go for SELECT ColA FROM Table1 WHERE ColB IS NOT NULL but it had the desired effect. If anyone knows a better solution or can give me some insight I am missing I would be grateful.
Thanks
Anonymous
8 years agoNot applicable
This is as far as I have got but i'm not having any luck. Any advice or suggestion would be welcomed.
MaxDate = Max( [Date], Filter( 'Finance'[STOR Hours vs Plan (%)_Actual], 'Finance'[STOR Hours vs Plan (%)_Actual] <> Blank() ) )
Thanks