Forum Discussion
Filtering a chart by the last date
Good morning, I'm trying to filter a line graph by the last date, which provides me with a date range filter. I would like the chart in this case to only appear values for 28/02/2022.
Hi, Syndicate_Admin ;
Try to create a measure:
Flag = var _max= CALCULATE(MAX('Table'[Date]),ALLSELECTED('Table')) return IF(MAX('Table'[Date])=_max,1,0)Then apply it into line chart.
The final output is shown below:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- amitchandak
Super User
Create measure like this. or create a measure and use that as visual level filter
measure =
var _max = maxx(allselected(date), Date[Date])
return
calculate(countrows(Table), filter(Date, Date[Date] =_max))
- Syndicate_Admin
Administrator
Good, I've tried the formula you put on me and it gives me back an integer, not the maximum date for the range of values.
On the other hand what you tell me about putting it as a visual filter, what would the configuration be like?
- v-yalanwu-msft
Community Support
Hi, Syndicate_Admin ;
Try to create a measure:
Flag = var _max= CALCULATE(MAX('Table'[Date]),ALLSELECTED('Table')) return IF(MAX('Table'[Date])=_max,1,0)Then apply it into line chart.
The final output is shown below:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.