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
yo_peralta23
Frequent Visitor

Dynamically filter slicer interval end date

Hi,

I`m trying to set dynamically the end field of a slicer date. Like this:

date.png

 

I tried this: 

DateEndMonth = IF(dw_ds_staffing_current[start_date]<=EOMONTH(TODAY(),0),dw_ds_staffing_current[start_date],BLANK())
And set it in the filter pane as not blank:
panel.png
But it cut off all future data and the slicer has no effect when I select a date later than 30 sept 2020 (in case of the current month is sept 2020) 

 

Thanks in advance

 

1 ACCEPTED SOLUTION
AllisonKennedy
Super User
Super User

@yo_peralta23 This is a common request. You could try voting for this or a similar request on Power BI Ideas, or post your own idea: https://ideas.powerbi.com/ideas/idea/?ideaid=0eab4ba7-b039-4785-9414-b8c94ab06e25

As a workaround, you could add a page level filter based on date, but as you have discovered this will filter all future data (I would suggest simply using Date as the page level filter and set to Past 5 years as a relative date filter (or 2 years or 10 years depending on your data). Unfortunately, this means you'll never have future dates, but it also means your slicer will only go as far as today every time you open the report.

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

1 REPLY 1
AllisonKennedy
Super User
Super User

@yo_peralta23 This is a common request. You could try voting for this or a similar request on Power BI Ideas, or post your own idea: https://ideas.powerbi.com/ideas/idea/?ideaid=0eab4ba7-b039-4785-9414-b8c94ab06e25

As a workaround, you could add a page level filter based on date, but as you have discovered this will filter all future data (I would suggest simply using Date as the page level filter and set to Past 5 years as a relative date filter (or 2 years or 10 years depending on your data). Unfortunately, this means you'll never have future dates, but it also means your slicer will only go as far as today every time you open the report.

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

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.