cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Last 4 weeks based on slicer of week number

Hi All,

 

I hope i can explain this correctly for you all and any help is greatly appreciated.

 

please see below the dashboard i have. it is sliced on week number which is in its own dates table using the calendar auto command.

 

I want to show the bottom left visual for week 6, 7, 8 and 9 as you can see its only showing week 9 at the moment as the week number slicer is set to week 9 top right.

 

so based on the week number slicer at the top right can it show the last 4 weeks just in that visual. I also know about the edit interactions to stop it taking on that specific slicer.

AdamRatcliff_0-1615396069599.png

 

 

Thanks,

Adam

1 ACCEPTED SOLUTION
ion_donica
Frequent Visitor

Hi @Anonymous ,

 

if you have a date, the relative filtering provided by Power BI could do the trick without entering in too much DAX:

ion_donica_0-1615396971295.png

Apply this to your visual and check if it is exactly what you want.

 

Best Regards,

ID

View solution in original post

4 REPLIES 4
ion_donica
Frequent Visitor

Hi @Anonymous ,

 

if you have a date, the relative filtering provided by Power BI could do the trick without entering in too much DAX:

ion_donica_0-1615396971295.png

Apply this to your visual and check if it is exactly what you want.

 

Best Regards,

ID

Anonymous
Not applicable

thanks a lot i think that has solved it! will that just pull today date every time then and show the last 4 weeks?

Yes, if you select include today, it will give you the las 4 weeks strating today.

Just make sure to check the diference in terms or result from Calendar week and Week and see which one suits you the most.

amitchandak
Super User
Super User

@Anonymous , you will need an additional independent date table for that.

 

refer this case with date table and 12 month

https://www.youtube.com/watch?v=duMSovyosXE

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors