Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rashidanwar
Helper III
Helper III

Making date range slicer to show last 30 days range by default

Hi Everybody,

I searched alot on this topic but didn't find any solution so far. I would appreciate any help.

I have a date range filter on a page and I want it to show last 30 days range by default, and if I wanted to see other date ranges I would like to be able to chnage the start date and end date  on the date range slicer manually.

Every day when I open the report, the date range filter should sow the startd date as today minus one and end date as today minus 31, and the charts shall be displaying the data for same date range.
However if I want to change the date range, I shall be able to change it manually and charts shall show data for that manually changed date range.

Thank you!

1 ACCEPTED SOLUTION
StefanoGrimaldi
Resident Rockstar
Resident Rockstar

you could try the following: 

1) make the value on the visual a dax that use a on select option dax statement, so when X condition its true will use a dax using on of the two filter type you telling here or the other

2) add the filters and a third filter with the value that would change the select dax value over the formula 

3) possible you will need to use parameters on the dax to be able to do this





Did I answer your question? Mark my post as a solution! / Did it help? Give some Kudos!

Proud to be a Super User!




View solution in original post

1 REPLY 1
StefanoGrimaldi
Resident Rockstar
Resident Rockstar

you could try the following: 

1) make the value on the visual a dax that use a on select option dax statement, so when X condition its true will use a dax using on of the two filter type you telling here or the other

2) add the filters and a third filter with the value that would change the select dax value over the formula 

3) possible you will need to use parameters on the dax to be able to do this





Did I answer your question? Mark my post as a solution! / Did it help? Give some Kudos!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.