Forum Discussion
Field parameter in Table – how to control or rename column headers?
I’m using a field parameter (Daily / Monthly switcher) to control which measures appear in a Table visual.
The field parameter works correctly, but in a Table:
The field parameter name (e.g. Daily Monthly Switcher) always appears as a column header (like "Daily", "Monthly")
In a Matrix, this isn’t an issue because the parameter behaves like a column group, but in a Table it’s treated as a regular column.
Is there any way to rename or dynamically control the column header generated by a field parameter in a Table?
Additional context: the same Daily / Monthly selection is also used to drive a calculation group, so the calc group logic and the field parameter are intentionally synced and controlled by a single switch.
This is a model which I am using:
https://drive.google.com/file/d/1F1e2tClUStXmS8sWxo_tt0UZtlFNfMWS/view?usp=sharing
Best,
Jacek
Ok problem solved,
1. Create a new field parameter with whatever names you want to be using in a table2. Relate the new field parameter with parameters fields order as 1 to many from previously created parameter
3. Use the newly created parameter in your table, so when you will switch parameter1 fields it will be visible also as column title in your table.
Best,
Jacek
4 Replies
- mh2587
Super User
Use the following appraoch.
Step 1: Create a disconnected table for the switcherCreate a table with your period options:
Switcher = DATATABLE("Period", STRING, {{"Daily"},{"Monthly"}})This table is not related to any other table in your model.
It will act as a slicer for users to select either Daily or Monthly.
Step 2: Create a dynamic measure
Create a measure that returns the correct value based on the selection:
Dynamic Value = VAR SelectedPeriod = SELECTEDVALUE(Switcher[Period], "Daily") RETURN SWITCH( SelectedPeriod, "Daily", [Daily Measure], "Monthly", [Monthly Measure] )Replace [Daily Measure] and [Monthly Measure] with your actual measures.
It picks the selected period from the slicer.
The measure will show the correct value in the Table based on the slicer selection.
Step 3: Use the measure in the TableAdd your Dynamic Value measure to the Table visual.
The Table will now only have one column for values, and the column header will be the measure name (e.g., “Dynamic Value”), not the field parameter name.
Step 4: Dynamic Table titleIf you want the Table header to reflect the selection:
Table Header Title = "Showing: " & SELECTEDVALUE(Switcher[Period], "Daily")Place this measure in a Card visual above the Table.
This lets users know whether the Table is showing Daily or Monthly data, without renaming the column itself. - jaryszek
Super User
Thank you cengizhanarslan
This pattern works technically, but it doesn’t fit my model because I already use calculation groups + a field parameter to handle Daily/Monthly globally.
In my case:
Daily vs Monthly logic is centralized in calc groups, so wrapping measures again with SWITCH() would be redundant and hard to maintain.
The disconnected switcher pattern only swaps values, it does not switch the grouping column (Date vs Month), which in my model is handled by a field parameter.
Using this approach would require creating “Dynamic …” versions of many measures (Actual, Budget, Variance, Delta, etc.), which goes against the goal of having one reusable base-measure pattern.
I already have a single synced slicer driving both the calc group and the field parameter; introducing another disconnected switcher would duplicate that logic and risk desynchronization.
So while the approach is valid for simpler models, it doesn’t work well with a calc-group-driven, field-parameter-based design like mine.
- jaryszek
Super User
Ok problem solved,
1. Create a new field parameter with whatever names you want to be using in a table2. Relate the new field parameter with parameters fields order as 1 to many from previously created parameter
3. Use the newly created parameter in your table, so when you will switch parameter1 fields it will be visible also as column title in your table.
Best,
Jacek - cengizhanarslan
Super User
You can’t rename, hide, or dynamically control the column header created by a field parameter in a Table visual. If possible, switch to a Matrix and:
Put the field parameter in Columns
Put your dimension fields in Rows