Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Last 4 Week filter

Hi ,

 

Any one please help here,

 

I need last 4 week to filter automatically in chart , see the below content for example.

 

mogunase1_0-1617346006686.png

I need individual filter to all visuals based on last week and prior to that upto 4 .

 

Note-

 

I tried using relative function , but its not came for me.

Because , the data which i have is last year data. And if i use Relative function of last 4 week it considering present date and showing blank value.

 

I need solution to be like below,

mogunase1_0-1617346754630.png

 

Please help .

 

1 ACCEPTED SOLUTION

Hi, @Anonymous  please check the link down below.

Please check page2, which is shown without using a tabular editor in Power BI.

In this case, I created one more table that is for the WEEK-Variance-Non-Tabular-Editor-Table.

 

https://www.dropbox.com/s/9dd1yerghfz9rpm/mogunase1.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

9 REPLIES 9
Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please check the below picture and the sample pbix file (link down below), whether it is what you are looking for.

I used Tabular editor in Power BI to create two calculation groups

1 calculation group = the purpose is to differentiate the number format (currency, non-currency)

2 calculation group = the purpose is to present the current week and the rest of the 4 previous weeks each.

Picture1.png

 

https://www.dropbox.com/s/9dd1yerghfz9rpm/mogunase1.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

I need the same exactly what you shown , but without using tabular editor.

 

Is this possible?

Hi, @Anonymous 

Thank you for your feedback.

it is still possible, I think....

but I don't think I can still display different number format (dollar and non-dollar) in one visualization.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

Hi,

Format is not a problem , but i need filter to be apply.

Possible?

Hi, @Anonymous 

Please check the link down below.

 

You can refer to the Page 3.

Related measures are in the folder name = Page3measures

The used tables in this case are Dim-Date-Table / Main Table / Description Table / Week variance non tabular editor Table -> 2 general tables plus 2 additional tables.

 

Just for your reference, if you use the tabular editor in Power BI, you can just use 2 general tables, and no need to create additional tables.

 

Thank you.

 

https://www.dropbox.com/s/9dd1yerghfz9rpm/mogunase1.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

I will create a sample pbix file by using my sample.

At this moment, I think I need to transform my original sample data to be unpivoted.

But, I am not sure how your table looks like.

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hi, @Anonymous  please check the link down below.

Please check page2, which is shown without using a tabular editor in Power BI.

In this case, I created one more table that is for the WEEK-Variance-Non-Tabular-Editor-Table.

 

https://www.dropbox.com/s/9dd1yerghfz9rpm/mogunase1.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

Thanks for your solution.

Got it!

amitchandak
Super User
Super User

@Anonymous , refer to my week on week blog if this can help you

 

Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
https://www.youtube.com/watch?v=pnAesWxYgJ8

 

 

In some case, you might need an independent date table, I discussed in this video :https://www.youtube.com/watch?v=44fGGmg9fHI

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.