Forum Discussion
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].
| ID | Structure | Label 1 | Label 2 | Label 3 | Value 1 | Value 2 | Value 3 |
| 1 | A | High Level | Low Level | Mid Level | 100 | 90 | 95 |
| 2 | A | High Level | Low Level | Mid Level | 120 | 100 | 110 |
| 3 | A | High Level | Low Level | Mid Level | 150 | 100 | 130 |
| 4 | B | Up Level | Down Level | 100 | 25 | ||
| 5 | B | Up Level | Down Level | 100 | 75 | ||
| 6 | B | Up Level | Down Level | 125 | 32 | ||
| 7 | B | Up Level | Down Level | 100 | 85 | ||
| 8 | C | Top | Down | 86 | 85 | ||
| 9 | C | Top | Down | 88 | 90 |
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:
| ID | Structure | High Level | Low Level | Mid Level |
| 1 | A | 100 | 90 | 95 |
| 2 | A | 120 | 100 | 110 |
| 3 | A | 150 | 100 | 130 |
| ID | Structure | Up Level | Down Level | |
| 4 | B | 100 | 25 | |
| 5 | B | 100 | 75 | |
| 6 | B | 125 | 32 | |
| 7 | B | 100 | 85 |
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
- ExcelMonkeImpactful 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
- GabinAMFrequent Visitor
Hi ExcelMonke
Thanks for your feedback!