Reply
Highlighted
Regular Visitor
Posts: 17
Registered: ‎08-01-2018
Accepted Solution

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?


Accepted Solutions
Super User
Posts: 1,791
Registered: ‎02-28-2017

Re: Slicer to show Week Numbers between Week 1 and Latest Week

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())

   

              Did I answer your question? Mark my post as a solution!
       

Proud to be a Datanaut!


   


View solution in original post


All Replies
Super User
Posts: 1,791
Registered: ‎02-28-2017

Re: Slicer to show Week Numbers between Week 1 and Latest Week

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())

   

              Did I answer your question? Mark my post as a solution!
       

Proud to be a Datanaut!