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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
AnetaK
Helper V
Helper V

Dynamic (very!) column headers in matrix

Hello,

I have an issue with column headers in matrix.

I need to show 12 months - dynamicly changed.

That is not a big issue - I can use a month name from the calendar as a column.

But there are two more requirements:

1. I have to add some other measures to the matrix,

2. These 12 month have to be dynamically changed by the slicer - so if I select September, then I want to see Sep and 11 prevoius months, if I select May, then May would be the first one and then 11 previous months.

 

AnetaK_0-1671179452607.png

 

What I did (as the only solution I found) - I created separate measures for each column and added additional cards with dynamic headers to cover the matrix headers.

It worked when I didn't touch the matrix.

AnetaK_1-1671179759776.png

 

But I can go up and down the 4-level hierarchy - and then the allignment is not working anymore.

AnetaK_3-1671179928174.png

 

I should have dynamic headers as a regular part of the matrix.

 

Any idea what can be done?

 

2 REPLIES 2
AnetaK
Helper V
Helper V

I already have two separate calendar tables, measure is not an issue.

Issue is how to change column names.

amitchandak
Super User
Super User

@AnetaK , Create slicer on an independent date table, then you can have measure like

 


//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
var _min = eomonth(_max, -12) +1
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))

 

 

Need of an Independent Date Table: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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

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.