r/PowerBI 2d ago

Question Dynamic column headers in a Matrix visual - is this finally possible in 2026?

Hi all,

I vaguely remember Microsoft having a dynamic column header feature for the Matrix visual on their roadmap at some point (possibly tied to the "modern visuals" rollout) - but I might be misremembering or conflating it with something else. Wanted to check with the community again.

My use case: I have a report with a top-level filter for Department and Year-Week. Below that, a Matrix combines several KPIs, structured roughly like this:

  • Target
  • Budget
  • KPI 1
  • KPI 2
    • KPI 2 (1 week before)
    • KPI 2 (2 weeks before)
  • KPI 3
  • KPI 4
  • etc.

Because of how these metrics behave, some of them only make sense in context - I need to show 2-3 prior data points alongside the current one to actually judge whether something is on track. Ideally the column header would combine the KPI name and the relevant week (e.g. "KPI 3 - Wk 32") so it's self-explanatory without extra legends.

Question: Is there now (or still not) a native way to make Matrix column headers dynamic based on measure names/selections?

16 Upvotes

14 comments sorted by

u/AutoModerator 2d ago

After your question has been solved /u/LeyZaa, please reply to the helpful user's comment with the phrase "Solution verified".

This will not only award a point to the contributor for their assistance but also update the post's flair to "Solved".


I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

3

u/Live_Organization591 2d ago

No there is no native way to do it ig. Matrix is very complex and dynamic so creating dynamic text and placing on column headers and than blending it with bc will also not work but do try once. Other than this I am not aware if any custom visual has this capability.

3

u/bgarcevic 2d ago

You can do it with deneb but seems to use a lot of CU due to the computation required.

2

u/illidra 2d ago

zebra tables have the option to add measures to the filter section of a matrix visual and then use those selected measures values as the column headers, but that's a paid set of custom visuals with a license cost

3

u/Natural-Heat-3019 2d ago

I have created it with dynamic text measures and placing them in front of the column headers. I used the wrapper visual to do it. Then I placed a square transparent visual in front of it. This way the user cannot see that it is a separate item.

3

u/PegLegHank 2d ago

I don’t think Power BI lets you make matrix headers truly dynamic from a measure.

There are basically two ways I’d approach it.

One option is to use the actual week field in the matrix columns, so the headers themselves are real values like:

wk 31 | wk 32 | wk 33

That can update automatically as new data comes in, but it does take some extra setup. If you just drop week into the matrix, old weeks won’t disappear on their own. You’d either need a rolling filter that always keeps the latest 3 weeks, or, if the user can select any week, a disconnected week slicer plus logic that only returns the selected week and the prior 1 or 2 weeks. With the other weeks returning blank and “show items with no data” turned off, the extra week columns should drop out.

I actually started going down that route before and I think it would have worked, but my priorities shifted and I never got around to fully finishing it and proving it out.

The simpler option, and what I’ve done in similar cases, is keep the headers generic:

Actual | 1 week prior | 2 weeks prior

Then put a dynamic subtitle above the matrix that updates to something like “data through wk 33” based on the current selection or latest available data.

If having the actual week numbers in the headers is important, the first approach is probably worth trying. Otherwise, I’d lean toward the generic headers with a dynamic subtitle since it’s simpler and still makes the timing clear.

Good luck and let me know if the first option works for you!

2

u/flatlander757 2d ago

Piggybacking on this I'd use a Top N visual filter to ensure only the current + 1 or 2 prior weeks show up.

If you need to be able to show history further back than that on mouseover (like in a tool tip) I think that Top N filter will keep those additional dates from showing.

The other way around this is I'd keep the entire original dataset, but in Power Query create a reference table which drops all but the 3 newest rows and call the columns to be renamed by Column{0} etc. to display Current/1wk Prior/2wk Prior etc. as needed. Keep this unrelated in the model and use the LOOKUP() function if needed to pull in additional data.

A third way I thought of as typing this is to instead of using dates to denote which are used, in Power Query sort by descending date then add an index column (I usually prefer from 0 so that 0 = most recent). Then use the index filter on the table (if not additional outside-date-context tooltips are needed) or just create a measure specifically to filter index <= 2. You could make a tool tip to display the date on mouseover as a sanity check, or just add it as another row to display in the matrix or table visual.

To add ANOTHER potential solution... since you denoted "Week 32" etc. as a viable option, you could align your index column with your weeks by filtering and sorting to align the index. Then build a calculated column to display "Week #" && number.totext([indexcolumn])" as a text string. This is something I tend to do to display timestamps on reports (and serves as a data check when trying to audit for accuracy of my reports).

3

u/jrrnwssls 2d ago

This is already possible for some time. Create a field parameter and change the field titles from static text to DAX functions to display for example the relevant week. Then just replace your current columns on the matrix with the field parameter.

1

u/Lollicupcake 2d ago

Came here to say this. I have a report now that does just this and users specify what columns they want included as well as the time period (MTD, QTD, YTD).

2

u/_greggyb 21 2d ago

Do these interrelationships change based on data? I.e., do you always want KPI 2 to have those two trailing week values?

If so, this is not dynamic, it is just a matter of static configuration. That configuration is not within the viz, but in the model. A combination of field parameters, parameter tables, and calc groups can cover this sort of thing.

What makes this dynamic?

1

u/AdHead6814 ‪Microsoft MVP ‪ 2d ago

I thought I was the only one who misremembered.

1

u/Remobeht 2d ago

I do something close to this with field parameters, the columns of which can be named dynamically.

1

u/Difficult_Escape3949 2d ago

Nope it's still not possible. Power BI still doesn't natively support dynamic measure header renaming in visual field wells, but you can achieve this exact requirement using a DISCONNECTED CALCULATED TABLE + ROUTING MEASURE PATTERN.

I had a very similar use case where users wanted matrix column headers to show exact dynamic dates (e.g., Last Wk End 08-29-2026 and Previous Wk End 08-22-2026) that auto-update as weeks roll by, rather than static metric names.

Here is how I solved this problem

Step 1: Created a Calculated Table for the Headers

Instead of relying on standard measure names, create a dynamic table using DAX. This calculates your target week dates dynamically and formats them into your desired header text.

Week Headers = VAR TodayDate = TODAY() VAR CurrentWeekStart = TodayDate - WEEKDAY(TodayDate, 1) + 1 VAR LastWeekStart = CurrentWeekStart - 7 VAR LastWeekEnd = CurrentWeekStart - 1 VAR PreviousWeekStart = CurrentWeekStart - 14 VAR PreviousWeekEnd = CurrentWeekStart - 8 RETURN UNION( ROW( "Period", "Last Week", "StartDate", LastWeekStart, "EndDate", LastWeekEnd, "Header", "Last Wk End " & FORMAT(LastWeekEnd, "MM-dd-yyyy") ), ROW( "Period", "Previous Week", "StartDate", PreviousWeekStart, "EndDate", PreviousWeekEnd, "Header", "Previous Wk End " & FORMAT(PreviousWeekEnd, "MM-dd-yyyy") ) )

Step 2: Created a Dynamic Routing Measure

Next I created a single measure that checks which column header Power BI is currently rendering and returns the corresponding KPI value:

Weekly Sold Units Dynamic = VAR SelectedPeriod = SELECTEDVALUE('Week Headers'[Period]) RETURN SWITCH( SelectedPeriod, "Last Week", [Last Week Sold Units], "Previous Week", [Prev Wk Units], BLANK() )

I already Created measure for Last week Sold Units and Previous Week sold units that I am Pointing out in this Dynamic Measure.

Step 3: Matrix Visual Setup

Put your row fields (e.g., Company or KPI Category) in the Rows section. Place the HEADER column from newly created 'Week Headers' table into the Columns field. Place [Weekly Sold Units Dynamic] into the Values.

Set your Matrix layout to Tabular.

Now Whenever a new week starts, the calculated table updates automatically. This refreshes the header column in the table, which updates your Matrix visual headers in also.

You can test this setup out, as it should resolve your dynamic header requirement nicely. Hope this helps.

1

u/gopalbi 1d ago

There is a native way to do this with Microsoft Fabric now with Fabric Plan's intelligence sheet which has the most advanced matrix in the world - https://learn.microsoft.com/en-us/fabric/iq/plan/intelligence-overview. With the billing update for PowerTable and Intelligence sheets official blog - https://community.fabric.microsoft.com/blog/fbc_fabricupdatesblogs/billing-personas-for-powertable-within-planning-in-fabric-iq-generally-available/5360168 - Intelligence sheets are cheaper than buying custom visuals