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
Anonymous
Not applicable

Slicer to show Week Numbers between Week 1 and Latest Week

Hi,

 

I want a slicer to show Week Numbers between Week 1 and whatever the number of the latest week will be as we go through the year.

 

I have a calendar that starts on 01/01/2016 and runs on until 31/12/2020. Within this calendar I have a Week Number column. I'm using this column in a slicer to filter results between Week Numbers. The issue I'm having is each week I need to go into the report and manually adjust this so the report looks up to date - at present I have 45 of these and don't want to have to do this all the time.

 

If I only have one year to deal with I would just clear the filter as a default and it would be taken care of. But because I need to give my users the ability to go back in time beyond the current year simply clearing it won't work.

 

Any thoughts on how I can do this?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

If your refresh is done daily, you could add a True/False field into your date table to check if the date is in the past.  The you could set a report/page level filter to exclude future dates.

 

In Power Query, you could do something like:

 

[Date] <= Date.From(DateTime.LocalNow())

View solution in original post

1 REPLY 1
Anonymous
Not applicable

If your refresh is done daily, you could add a True/False field into your date table to check if the date is in the past.  The you could set a report/page level filter to exclude future dates.

 

In Power Query, you could do something like:

 

[Date] <= Date.From(DateTime.LocalNow())

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.