Forum Discussion
Show only data from the latest date
- 8 years ago
Hi ChristianTD,
Seems date type values don't have a "TOP" filter type. I would suggest you try the measure below and add it to the "Visual Level filter". Don't need to add it to any visual. Then filter the filter as "1". Please give it a try.
Measure = VAR LatestDate = CALCULATE ( MAX ( 'Table1'[Date] ), ALL ( 'table1' ) ) RETURN IF ( MIN ( 'Table1'[Date] ) = LatestDate, 1, 0 )Best Regards,
Dale
I would like not to show the new column.
I also tried with a measure Latest = LOOKUPVALUE(Table[Date];Table[Date];MAX(Table[Date])) and then adding my date to the filter and add top 1 by Latest.
Alternatively wouldn't just a simple filter work.. date top 1 by date?
- v-jiascu-msft8 years agoMicrosoft Employee
Hi ChristianTD,
Seems date type values don't have a "TOP" filter type. I would suggest you try the measure below and add it to the "Visual Level filter". Don't need to add it to any visual. Then filter the filter as "1". Please give it a try.
Measure = VAR LatestDate = CALCULATE ( MAX ( 'Table1'[Date] ), ALL ( 'table1' ) ) RETURN IF ( MIN ( 'Table1'[Date] ) = LatestDate, 1, 0 )Best Regards,
Dale
- cmcghee925 years agoNew Member
In the accepted solution why does this work with either MIN or MAX in the IF logic . It is making my brain swim
- Anonymous7 years agoNot applicable
And if he'd sorted desc by date and remove duplicates for ID&Date? Assuming PBI takes first occurred and drops the rest, wouldn't that be better for more ID's?
- Anonymous7 years agoNot applicable
This is great, thank you much!