Forum Discussion
SELECT MAX(Date) FROM Source WHERE {Reference_Column] IS NOT NULL
- 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
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