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

How to show data for last 4 weeks based on selected week in slicer?

Hi,

 

I am currently stucked trying to figure out how to show in table data for previous 4 weeks based on selected week in slicer? Ideally, if it is selected current week (2022-11-26 - I am showing as Week Ending), to have in Rows only weeks for current month, meaning:

2022-11-19

2022-11-12

2022-11-05

 

In my Calendar table, I have columns:

1) Week Ending, [Date]-MOD([Date]-1,7)+

2) This Week Slicer = if( value(YEAR (NOW() ) & 100 + WEEKNUM (NOW() )) = value(('Calendar'[Week Year Number])), "This Week",FORMAT('Calendar'[Week Ending],"YYYY-MM-DD")) - I am using this one for slicer where "This Week" represent current week (in my case 2022-11-26)
3) Last Week Ending = DATEADD('Calendar'[Week Ending],-7,DAY) - I am using this one for table to show always data for previous week based on week selected in slicer.
 
...but how to show 4 previous weeks instead of only one? Why slicer does not alow me to show list of all previous weeks, instead of only one?
 
NebojsaZ88_0-1669380847440.png

 

3 REPLIES 3
NebojsaZ88
Frequent Visitor

Never mind. I fould solution. Thanks anyhow.

Could you please share the solution we need to implement same.

lbendlin
Super User
Super User

Weeks and Months are not compatible. Please provide a more detailed explanation of what you are aiming to achieve. What have you tried and where are you stuck?

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.