Forum Discussion
Dynamic column header in table based on values in one field
Hi Soc3
Yes, you can dynamically change the column header in Power BI without creating separate measures for counting Stationary and Mobile. You can achieve this using a Measure and a Field Parameter.
Steps:
- Create a Measure for Dynamic Column Header:
This measure will return "Count of Stationary" when "Stationary" is selected in the slicer and "Count of Mobile" when "Mobile" is selected.
2. Create a Measure for Count:
3. Add the Measures to Your Table Visual:
Use DynamicColumnHeader as the column header.
Use CountSelected as the column values.
Since DynamicColumnHeader changes based on the slicer selection, the table will update dynamically.
When Mobile is selected:
When Stationary is selected:
Best regards,
Ray Minds
http://www.rayminds.com
https://www.linkedin.com/company/rayminds/
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.