Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Team,
I have a custom scenario for date slicer between.
I have a dashboard which contains a Date slicer(between) for user to select different month of data, the data will refreshed every day.
However, I don't know how to make the slicer automatically pointing to the last 30 days from refresh date or MAX(date) available in table.
From date as 30 days before date and To date is last refresh date or MAX(date) available in table.
The above scenario should work when user clicks the report page or navigate from different page.
As a second scenario after seeing the last 30 days data in the same page/screen, if the user selects the from_date and to_date in the between slicer based on the slicer it should reflect the data in screen.
Has any one come across this situation scenario?
Thank you.
Solved! Go to Solution.
Why not use the Relative Date options in the Filter Pane?
Hello @ssspk ,
As suggest by other you can use "Relative Dates" filter and also as an alternative you can create calculated column in your table which can be used as slicer for last30days..
Use this code below
IsInLast30Days =
VAR MaxDate = MAX('YourTable'[DateColumn])
RETURN IF(
'YourTable'[DateColumn] >= MaxDate - 30 && 'YourTable'[DateColumn] <= MaxDate,1,0)
If you find this helpful , please mark it as solution and Your Kudos/Likes are much appreciated!
Thank You
Dharmendar S
Why not use the Relative Date options in the Filter Pane?
User | Count |
---|---|
5 | |
5 | |
3 | |
2 | |
2 |
User | Count |
---|---|
9 | |
7 | |
4 | |
4 | |
4 |