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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
paulvans182
Helper III
Helper III

Slicer: Relative Date - Dynamic Anchor Date

Good afternoon,

 

I wonder if anyone can help me. 


I have a data model where the data is shows data between September 2018 and, currently, May 2020.  

 

I am trying to work with a Relative Data slicer to allow the user to view data and charts for the Last X Days/Weeks/Months/Years. 

 

However, currently, even though there is no data after May 2020, if the user selects the last 30 days for example, no data is returned because it is showing the date range between August 2020 and September 2020.

 

I have seen that there is an Anchor Date option, where I can hard code the latest date I would like to include in my date range.  However, when new data is consumed for May-August (for example), it would then exclude this data until I manually change the Anchor date.  

 

Is there a way I can dynamically set the Anchor date by using a Measure or some other method?

 

Thanks for the help

 

Kind regards,

Paul

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@paulvans182 , see if a similar solution in the past can help

https://community.powerbi.com/t5/Desktop/Required-custom-date-Slicer-Last-7-days-last-15-days-last-3...

 

Also refer : https://www.youtube.com/watch?v=duMSovyosXE

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

3 REPLIES 3
v-diye-msft
Community Support
Community Support

Hi @paulvans182 

 

Not quite understand your requirement, plz kindly refer to the below similar cases whether helps, if not, you might consider providing your dummy pbix that would be helpful for us to investigate it further. 

https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dynamic-Flag-on-dates-based-on-a-date-slicer/...

https://community.powerbi.com/t5/Desktop/Feature-Request-Dynamic-Relative-Filter-For-2-or-more-dates... 

https://community.powerbi.com/t5/Desktop/Time-intellegence-an-relative-date-slicer/m-p/983533 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Hi @v-diye-msft ,

 

Thanks for the response.  I believe that @amitchandak provided the answer I was looking for.  Was just trying to find a way to make the Anchor Date of the Date Slier dynamically.

 

Instead, I have managed to create a custom relative date set of slicers.  Am actually quite proud of the solution (it has taken alot of learning and patience in the past few days.)

 

The user is able to use a parameter to select a number, and then select Days/Weeks/Months/Years using a data island table.  This then sets the filter for the period of time essentially allowing me to show the data for the last X amount of time.  

 

Thanks for your time though.

 

Kind regards,

Paul

amitchandak
Super User
Super User

@paulvans182 , see if a similar solution in the past can help

https://community.powerbi.com/t5/Desktop/Required-custom-date-Slicer-Last-7-days-last-15-days-last-3...

 

Also refer : https://www.youtube.com/watch?v=duMSovyosXE

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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