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 only the last 18 Fiscal weeks

Hi,

I need the slicer to show the last 18 fiscal weeks including the current week. Can some one help?

 

Adding the date to the filter pane did not help, I've tried to set to the last 18 weeks, the starting week is not a full week, it will filter from 21/02/2020 til today,  I want to filter from 16/02/2002. The other option is  the last 18 calaneder week exculdes current week.

 

Thanks in advance.

7 REPLIES 7
amitchandak
Super User
Super User
Anonymous
Not applicable

@amitchandak , I have done that as well as I mentioned in my first post, that won't work. 

 

"Adding the date to the filter pane did not help, I've tried to set to the last 18 weeks, the starting week is not a full week, it will filter from 21/02/2020 til today,  I want to filter from 16/02/2002. The other option is  the last 18 calaneder week exculdes current week."

Anonymous
Not applicable

As you can see from below screenshots, the filter type Relative date for 'weeks' and 'Calendar weeks'. You can see the date range for 'weeks' starts from 21/02/2020, which is Thursday of that week, it should be 16th of 17th /02/2020.

 

As for 'calendar weeks' it exclude current week because of it is not a complete week.

WeekSlicer2.PNG

Anonymous
Not applicable

Hi  @Anonymous ,

 

Create a calculated column as below:

 

Column = 
var _mindate=CALCULATE(MIN('Table'[Date]),FILTER('Table',YEAR('Table'[Date])=YEAR(TODAY()-7*18)&&WEEKNUM('Table'[Date],1)=WEEKNUM(TODAY()-7*18,1)))
Return
IF('Table'[Date]>=_mindate&&'Table'[Date]<=TODAY(),'Table'[Date],BLANK())

 

And you will see:

Annotation 2020-06-26 165957.png

For the related .pbix file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Anonymous
Not applicable

@Anonymous , thank you, that helped.

harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

You can try this trick for weeks too

 

http://sqljason.com/2018/03/display-last-n-months-selected-month-using-single-date-dimension-in-power-bi.html

 

Regards,

Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Anonymous
Not applicable

Thanks @harshnathani , this is not what I want. my issue is related to the just the fiscal week slicer not a specific measure. I want the user to see only within the last 18 fiscal weeks in the slicer.

BTW, my data source is tabular medel.

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.