Forum Discussion
Get last value (last date) when using filter
Hi, I'm have one database that's look like this:
| date | value |
| jan/22 | 4 |
| feb/22 | 5 |
| mar/22 | 6 |
| abr/22 | 7 |
| may/22 | 4 |
| jun/22 | 5 |
| jul/22 | 4 |
| aug/22 | 6 |
| sep/22 | |
| oct/22 | |
| nov/22 | |
| dec/22 |
I want to show the last value, according a filter visual I have in my report. For example, if I filter between january/22 and june/22 I want to return the value as 4 (last date = june/22, according my selection in filter). The problem is, when I'm using this measure calculate(sum(value), date = max(date), it's all returning the value for my last date (december/22) and not respecting the date range filter. Please, could you guys help me how to do this dax measure?
Thank you!
4 Replies
- amitchandakSuper User
- VahidDMSuper User
HI hama21
Do you use the Slicer visual to set a filter on your report?
Do you use that measure in a card? Have you checked the Slicer (filter) interactions?
Read this:
Change how visuals interact in a Power BI report
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn | Twitter | Blog | YouTube