Forum Discussion
Using Measures in Field Parameters Name for Dynamic Column names
Hi all:
I attach sample PBIX here:
https://1drv.ms/u/c/30e88b19d3b8db6e/IQAMk0w4gkaeToEqN0ZtAnWsAWN8k4xep-5vUnWMmrB9xi0?e=Q3JW3B
I need to create Table/Matrix element with Dynamic column names based on slicer selection.
The report filters a unique Plan for example P2-2025 and based on this selection two measures are calculated based on year displacement.
My requirement is to have table/matrix with Dynamic Column names like:
- Amount 2025 for Amount Y+0 and Amount 2026 for Amount Y+1 it the user Selects Plan P2-2025
- Amount 2026 for Amount Y+0 and Amount 2027 for Amount Y+1 it the user Selects Plan P2-2026
For this purpose and othe report requirements I am using this Field parameter (show 2 examples) with and without Title Measures
Parameter = {
("Amount Y+0", NAMEOF('KPIS'[Amount Y+0]), 0),
("Amount Y+1", NAMEOF('KPIS'[Amount Y+1]), 1)
}
This example doesn't work
Parameter2 = {
([TitleAmount Y+0], NAMEOF('KPIS'[Amount Y+0]), 0),
([TitleAmount Y+1], NAMEOF('KPIS'[Amount Y+1]), 1)
}
View another filter example P2-2025
Regards
Hi dpombal
You can’t achieve that with field parameters. Field parameter names are static—whatever is defined in the parameter table is exactly what will appear in the visual. They don’t change dynamically. To get this behavior, a separate table is needed that contains all possible column names, then use measures that reference those columns and control which one is shown based on logic.
Please see the attached pbix.
4 Replies
- lbendlinSuper User
Why do you need dynamic columns? Doesn't look like you are planning to let the user choose them?
- cengizhanarslanSuper User
Unfortunately Field Parameters can’t use a measure for the parameter “name/label”. Instead follow the options below:
Option A (recommended): use a 2-level column header
Put Year (from your calendar/date table) on Columns, then put a static parameter like Y+0 / Y+1 under it (or vice-versa). This gives users the year context in the header without needing dynamic renaming. You keep measures as they are; you just structure the matrix columns so the year is visible.Option B: show the “dynamic title” above the visual
Keep your field parameter labels static (“Amount Y+0”, “Amount Y+1”), and create a dynamic visual title measure like:“Amount 2025 (Y+0) | Amount 2026 (Y+1)”
Then apply it via Title → fx. This is the closest “dynamic header” you can do in native visuals.
- danextianSuper User
Hi dpombal
You can’t achieve that with field parameters. Field parameter names are static—whatever is defined in the parameter table is exactly what will appear in the visual. They don’t change dynamically. To get this behavior, a separate table is needed that contains all possible column names, then use measures that reference those columns and control which one is shown based on logic.
Please see the attached pbix.
- dpombalPost Partisan
It complicates a lot my report but it is the only option i hope in future a new option easier for dynamic column names...