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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

How do select last five weeks in matrix and display auto append

I've created column for weeks and want show only last 5 columns in matrix with auto append feature . it should add latest week in visual once data is updated

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

You could simply add the [date] to visual filter and set filter value as "in last 4 weeks".

1.jpg

2.jpg

 

Best Regards,

Jay

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

 

You could simply add the [date] to visual filter and set filter value as "in last 4 weeks".

1.jpg

2.jpg

 

Best Regards,

Jay

Anonymous
Not applicable

thank you

amitchandak
Super User
Super User

@Anonymous , check suggestion by @Anonymous ,

 

You can create a new column like this in date table, and select last 5 week and save

 

Week Type =
var _st = today() +-1*WEEKDAY(today() ,2)+1 -35
var _end = today() + 7-1*WEEKDAY(today(),2)
return
Switch( True(),
[Date] >= _st && [Date] <= _end ,"Last 5 week" ,
[Week Name]
)

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
Anonymous
Not applicable

Following these steps may resolve your query-

1) Select the matrix/visualization from the canvas
2) Go to the filters pane 
3) Go to 'Filters on the visual' > Drag your column field and then expand it
4) From filter type select 'Top N'
5) Beside top enter value as 5
6) Drag your column field again in 'By Value' and click apply filter

This may resolve your query of showing the last five weeks and it will also do auto append to show the latest week as soon as the data is updated

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.