Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a measure named current year(2021-2022) and Prev Year (2020-2021).
My requirement is to change the column name based on the slicer selection, here the slicer is year column.
Example : When i select 2020-2021 and 2021-2022 in the display Year slicer, my current year column should change as "2021-2022" and prev year column should be "2020-2021"
Can anyone help me how to write DAX to change the column name dynamically ?
output is as below
display year is slicer selection
Hi @Anonymous
You can use matrix visual to get that effect. The process is probably: create two measures, one is used to return the dynamic column header, and the other measure is placed in the value field of matrix. FYI: Dynamic column header in Matrix, Message 3.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Please check if this blog from Parry can help
Show dynamic column name
https://perytus.com/2021/02/04/improve-ux-show-year-in-legend-when-using-time-intelligence-measures/
Or you need a hybrid table workaround. Display two years using an independent table and then create a hybrid table
if you are looking for a Hybrid display with Matrix Column and measure
https://community.powerbi.com/t5/Community-Blog/Creating-a-custom-or-hybrid-matrix-in-PowerBI/ba-p/1354591
https://community.powerbi.com/t5/Quick-Measures-Gallery/The-New-Hotness-Custom-Matrix-Hierarchy/m-p/963588#M428
vote for Hybrid Table
https://ideas.powerbi.com/ideas/idea/?ideaid=9bc32b23-1eb1-4e74-8b34-349887b37ebc
Show 2 year when 1 is selected - then use Hybrid Table
Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI
can i set column name in dax base on slicer selection.
below is my dax.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!