Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

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?

  • Anonymous's avatar
    Anonymous
    7 years ago

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

1 Reply

  • Anonymous's avatar
    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())