Forum Discussion
Filter argument changing on the select date
Hello, everyone,
I have a query as below to summarize based on the LatestDate.
I am wondering changing the LatestDate based on the selection on the filter. If seleting 02/29/2020, the LatestDate changes to 02/29/2020 accordingly. If 03/31/2020, change to 03/31/2020.
Should I also need to create another Date table?
Thank you for help.
Dennis
CALCULATE (
Sum(Loss[Amount]),
DateDim[DateKey] <= LatestDate )
Thank both of you,
Per Aiolos aproach, 'You can create a date slicer, the Power BI has the function that you want by default', it works well.
But is possible to create a measure or text box to remind the user the date selected?
Or any other approach?
Dennis
5 Replies
- AnonymousNot applicable
Hi 12Bowers12 ,
You can create a date slicer, the Power BI has the function that you want by default.
Please try.
Aiolos Zhao
- 12Bowers12
Helper V
Thank you much, it works now.
- vivran22
Community Champion
Hello 12Bowers12 ,
Is your objective to provide the input of LatestDate as a slicer selection instead of hardcoded date ?
If yes, then you can use replace your VAR statement with:
VAR LatestDate = MAX([Date Coulumn])
If not, then please share more details around the requirement.
Cheers!
Vivek
Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter- 12Bowers12
Helper V
Thank both of you,
Per Aiolos aproach, 'You can create a date slicer, the Power BI has the function that you want by default', it works well.
But is possible to create a measure or text box to remind the user the date selected?
Or any other approach?
Dennis
- AnonymousNot applicable
Hi 12Bowers12 ,
Yes. You can create a measure to show the date range, like:
measure = “Date Range: " & min(your_date) & " - " & max(your_date)Please try.
Aiolos Zhao