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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Dimitris_Kats
Helper V
Helper V

Dynamic measure name

Spoiler
 

Hello dear members. 

I need your help.

I have created the following measure:

Calculate(sum('table'[value]), selectedvalue( 'Version'[version]= 'table'[version]))

This measure is dynamin and calculates different scenarios based on user's  slicer selection. So if the selection is Actual the measure returns the actual value. If the selection is forecast it returns the forecast value. It works perfectly. 

I have used that measure and 2 other similar to this in a matrix. 

The problem is that the column name doesn't change based on the selection but it is stable and based on the measure name.

How can I dynamically change the column headers??

 

 

Thank you very much 

6 REPLIES 6
Alex87
Solution Sage
Solution Sage

After some further investigations, I found a hack of how you might achieve it : using field parameters:

https://youtu.be/BLNqU2jJ7u0?si=W7-_yT4E2s2ZNYPU

In the meantime, there is also an idea that you can vote for to encourage Microsoft to develop a simpler more direct feature:

Microsoft Idea

 

If this post helps you, please mark it as a solution. Thanks!




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!




Hi. Thank you very much but I a have already dried field parameters. This was my first approach but I have to compare the 3 selected version between them and there are 13x13x13 combinations. I can't support it. 😞

 

Thank you very much again for your support 

Alex87
Solution Sage
Solution Sage

I do not understand what it the problem you want to solve. What column name? used where? can you provide more examples, ideally print screens of what you have and what are your expectations? thanks




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!




Hi. Thank you very much for your reply.

As I mentioned I have used the following measure in matrix

Selected Version 1= Calculate(sum('table'[value]), selectedvalue( 'Version1'[version1]= 'table'[version]))

In the matrix the column name displayed is the Selected Version 1

I want that name to change dynamically based on the slicer selection. So if the user has selected from the slicers "Actual" then I want as column name "Actual" 

I hope this makes sense now 😃 

Thank you! It is clear now!  🙂

From what I know, as of today, there is no possibility to change the name of the column created in the matrix. The hack I am usually doing is that I replace the name of the measure in the visual with an empty character (instead of Selected Version 1) (Empty Characters, Whitespaces & Blank Unicode Characters) and I overlay on the matrix an empty button where I control through fx the text to be displayed. (do not forget to activate maintain layer order on).

Does it answer your query?




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!




Hi. Thank you so much for your help.

This is what I am currently using but I have been asked to create several more tables with monthly analysis so on and I was hoping to find a better, quicker and more viable solution 🙈

Thank you so much again for you help.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.