Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Good afternoon,
I’m hoping someone can help me with this limitation in Power BI. I’m building a report that includes some Matrix visuals where I’ve placed a field parameter in the Rows and a few metrics in the Values. For simplicity, I’ll mention only three metrics: Current Year Sales, Previous Year Sales, and Sales Variation.
What I would like to achieve is dynamic column names that change based on the year selected in the slicer. For example, if the user selects 2024, the columns should be labeled as 'Sales 2024' and 'Sales 2023.' If 2023 is selected, they should show as 'Sales 2023' and 'Sales 2022.'
Is it possible to implement this dynamic naming of columns?
Hi @Vcaze ,
Currently for matrix visual, there is no support for dynamically changing column names, you can only refer to the alternative provided by @SamWiseOwl @audreygerred @Kedar_Pande .
Best Regards,
Adamk Kong
Hi! It is not possible for the headers to be dynamic like you are requesting. What I usually do when someone insists on having the actual date instead of undertstanding that This Year = whatever year you are filtered to and Last Year = the year before you are filtered to I add a legend to the page using a table or cards so that they have a visual reference as to what this year and last year are representing.
Proud to be a Super User! | |
Dynamic Current Year Sales Name =
"Sales " & SELECTEDVALUE(Year[Year])
Dynamic Previous Year Sales Name =
"Sales " & (SELECTEDVALUE(Year[Year]) - 1)
Use a Card visual to show dynamic names created in the measures above and place it on the column header.
Direct column headers in the Matrix can't change dynamically, but using additional visuals can help simulate this effect.
If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Thank you for your help. That solution works for Matrix with few columns, which is not my case.
Thank you for your time
Hi @Vcaze
I could be wrong but I don't believe so.
Instead you can insert a blank button: Insert | Buttons | Blank Button
Then set the Text equal to a measure:
Dynamic Button text = "Sales " & SelectedValue(table[year])
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
@Vcaze You can make the visual title dynamic.
That way it reads 2024 above all of them.
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
Thank you for your answer. I know that the title can be dynamic, but I really need to dynamically change the column names.
Thank you.
User | Count |
---|---|
123 | |
76 | |
63 | |
50 | |
50 |
User | Count |
---|---|
175 | |
125 | |
60 | |
60 | |
58 |