Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Custom column (Recent Date) not working as filter in visual

hi All,

 

I am working on my first Power BI report. 

 

Requirement is pretty simple. 

I have to visual the data for the latest(MAX) date from the table. 

 

Steps I followed:

1. Created a new column  MaxReportDate= MAX('table_1'[ReportDate]). This gives me maximum date in the data set. 

2. Now in visual, i pull the rest of the data and put this maxReportDate in filter. But nothing happens. the data is not filtered by this column. 

3. How ever, If I pull all the report dates in the visual and then click on recent date, it works. 

4. I also tried creating another column with below query

MaxReportDateFlag = VAR LatestDate =
CALCULATE ( MAX ( 'table_1'[ReportDate]), ALL ( 'table_1' ) )
RETURN
IF ( MIN( 'table_1'[ReportDate] ) = LatestDate, 1, 0 )
5. This calculation is retruning only 0 and not 1 for the max date. 
5. What is it that I am missing ?
 
Any help is appreciated!

3 Replies