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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Rahul_SC
Helper IV
Helper IV

Dynamically changing fields in table

Hi all,

 

How can I make this table dynamic in power BI. In next week, when the source data is updated with a new week (week 23) then this table should automatically gets refreshed like (week 18 should be removed and week 23 should be added in the feild) 

 

 

Rahul_SC_1-1654964701434.png

 

 

 

3 ACCEPTED SOLUTIONS
krohitrao
Regular Visitor

Hello,

Assumption: The weeks will be displayed only for a selected year. (i.e. the weeks are all from the same year and not from 2 different years).

You can follow the below steps and achieve the requirement:
1. Create a duplicate column of the Week Name. [ex: "Week 18 (2-8 May)" ]
2. Split the text with space delimiter and retain the column which gives the week number only. (i.e. 18, 19, 20 etc.)
3. Create a measure finding maximum of the week number.

MaxWeek = Calculate(MAX('Table'[Week Number]), ALL())
4. Create a calculated column which gives difference of MaxWeek with the week number.
Diff = [MaxWeek] - 'Table'[Week Number]
5. Now in the matric visual, add a filter for Diff -> Advanced filtering -> is less than 4

This will always show the top 4 weeks only. 
If weeks need to be taken irrespective of the year, then the logic for finding max week will change all others remain same.

View solution in original post

thanks for the link, it worked.

View solution in original post

tamerj1
Community Champion
Community Champion

@Rahul_SC 
Would you please consider marking my reply as acceptable soltion? Thank you

View solution in original post

5 REPLIES 5
Rahul_SC
Helper IV
Helper IV

@tamerj1 , Hi, sorry, I thought I had accepted it as a solution.

krohitrao
Regular Visitor

Hello,

Assumption: The weeks will be displayed only for a selected year. (i.e. the weeks are all from the same year and not from 2 different years).

You can follow the below steps and achieve the requirement:
1. Create a duplicate column of the Week Name. [ex: "Week 18 (2-8 May)" ]
2. Split the text with space delimiter and retain the column which gives the week number only. (i.e. 18, 19, 20 etc.)
3. Create a measure finding maximum of the week number.

MaxWeek = Calculate(MAX('Table'[Week Number]), ALL())
4. Create a calculated column which gives difference of MaxWeek with the week number.
Diff = [MaxWeek] - 'Table'[Week Number]
5. Now in the matric visual, add a filter for Diff -> Advanced filtering -> is less than 4

This will always show the top 4 weeks only. 
If weeks need to be taken irrespective of the year, then the logic for finding max week will change all others remain same.
tamerj1
Community Champion
Community Champion

Hi @Rahul_SC 

please follow the instructions in this video. You just need to change the 6 months period with 6 weeks period 

https://youtu.be/d8Rm7dwM6gc

thanks for the link, it worked.

tamerj1
Community Champion
Community Champion

@Rahul_SC 
Would you please consider marking my reply as acceptable soltion? Thank you

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.