Forum Discussion

GabinAM's avatar
GabinAM
Frequent Visitor
2 years ago
Solved

Flexible Column Name - Field Parameters

Hello everyone ! 😊

Initial Situation
I have to work on a tricky dataset with unbrand columns name. Please see below an example. 

As you can see, the correct columns name for Value 1 should be Label 1, for Value 2 Label 2, etc... However, the name of the label vary based on the structure [A, B, C].

IDStructureLabel 1Label 2Label 3Value 1Value 2Value 3
1AHigh LevelLow LevelMid Level1009095
2AHigh LevelLow LevelMid Level120100110
3AHigh LevelLow LevelMid Level150100130
4BUp LevelDown Level 10025 
5BUp LevelDown Level 10075 
6BUp LevelDown Level 12532 
7BUp LevelDown Level 10085 
8CTopDown 8685 
9CTopDown 8890 


In order to visiualise the data easily, I would like to create a table with flexible Column name based on the Label. Please see below the desired result: 

IDStructureHigh LevelLow LevelMid Level
1A1009095
2A120100110
3A150100130

 

IDStructureUp LevelDown Level 
4B10025 
5B10075 
6B12532 
7B10085 

 


In PowerBI
In order to reach this result, I created a Parameter with Variable Parameter Name based on Measure.

 

However, if on card the Measure display the correct value, on the table the column name remains unchanged. Please see below. 

 

Example 1

 

Example 2


I tried different possibilities but unfort I'm still stuck with my table... so I would be very grateful if you can have a look at this 🙏

Please find here the PowerBI as well as the Excel files. 

Many thanks in advance for your help! 

  • Hello,

    Unfortunately, you are not able to dynamically change the name of a column within a table/matrix visual. What you can do however, is have a dynamic title to your visual. You can then do something like: 

    VizTitle = 
    
    CONCATENATE("Model Based on ", SELECTEDVALUE(Sheet1[Label]))

     

    In projects where I had to create something similar, I called the column "Modeled Value", to indicate that this is a value that is dynamic depending on what the end-user selects

     

2 Replies

  • ExcelMonke's avatar
    ExcelMonke
    Impactful Individual

    Hello,

    Unfortunately, you are not able to dynamically change the name of a column within a table/matrix visual. What you can do however, is have a dynamic title to your visual. You can then do something like: 

    VizTitle = 
    
    CONCATENATE("Model Based on ", SELECTEDVALUE(Sheet1[Label]))

     

    In projects where I had to create something similar, I called the column "Modeled Value", to indicate that this is a value that is dynamic depending on what the end-user selects