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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
sharong
Helper I
Helper I

Dynamic column headers in matrix

Dear Team,

I have a matrix visual. I want the column headers to change according to slicer selection. If the slicer selection is 2023-02, then i want the headers to be as

Current period = 2023-02 and previous period as 2022-02

Kindly help me in this.

sharong_0-1672205558019.png

 

1 REPLY 1
FreemanZ
Super User
Super User

hi @sharong 

Header text is the name of the column or measure, which can't be dynamic. 
As a workaround. try to: 
1) hide the headers by setting the same color as the background. 
2) place a card visual or textbox with such code instead:
Current Period =
VAR _period =SELECTEDVALUE(TabelName[Select Fiscal Period])
RETURN
_period & " and previous period as " & SUBSTITUTE(_period, "23", "22")

FreemanZ_2-1672207298517.png

 

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.