Forum Discussion
Dynamic Column Header based on Filter from another field
Hi I'm stuck figuring out how to change column headers in a table/matrix for a dynamic field that is filtered by scenario.
I have 3 filtered fields: Alpha, Beta, Gamma. These fields allow users to select from actuals to budget to forecast. When I bring down the data in a matrix, I want to be able to switch the column header so when Alpha is set to "Act", the column will say "Act" instead of "Alpha_all" (this is a calculated measure). I tried using field parameters but haven't had much luck.
11 Replies
- AnonymousNot applicable
Hi jaktony ,
Based on the testing, create the new table as bridge.
Then, creating the new measure to filter.
Dynamic column headers = SWITCH(MAX('Selected Table'[TableHeaders]), "Actual",[Actual], "Budget",[Budget], "PY Actual",[PY Actual] )The result is shown below.
You can also view the following link to learn more information.
Solved: Dynamic Column Names for Matrix Visual using Slice... - Microsoft Fabric Community
Solved: Dynamically changing matrix column headers based o... - Microsoft Fabric Community
Solved: How to create dynamic column headers & custom cond... - Microsoft Fabric Community
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- jaktonyHelper I
Thank you for the reply Anonymous , however each Scenario name should have its own selection rather than selection driving all scenario name.
For example,
Alpha = Act
Beta = Bud
Gamma = Forecast
In your suggestion, if the selector is set to "Actual" - all scenario's (Alpha, Beta, and Gamma) will be set to "Actual"- AnonymousNot applicable
Hi,
Try to create the following table. Adding the relationship between new table and scenarios table.
Measure = SWITCH(MAX('Table'[TableHeaders]), "Actual",[Actual], "Budget",[Budget], "PY Actual",[PY Actual] )If it still doesn't work, please provide sample data.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- jaktonyHelper I
Thank you again for your reply. I have attached a sample data file replicating my main file. Please let me know if you have questions.
PBI Test File