Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Dynamic column name using Field Parameters

Hi all,

I have created table chart to show Views for Content 'News', 'Series' and 'Movies'
In that I have shown Current month views and Previous month Views for those 3 above contents 
I have also shown avg month to month views percentage also 
So here my query is it must show the current month name for whatever month I selected from date slicer
I I select May 2022, it must show May 2022 As column header in place of Current Month 
and same for Previous month it must show the Previous month name for whatever month I selected from date slicer
If I select May 2022 it must show April 2022 as Column header in place of Before prev month

I tried to create using Field Parameters option that is there in PBI
But it's showing static names just showing Current month and previous month name if I select any date also
It's not changing dynamically

Month Name =
    {
    (
        FORMAT(DATE(YEAR(MAX('Fact Content'[date])), MONTH(MAX('Fact Content'[date])) , 1), "MMMMDD-YYYY"),
        NAMEOF('Fact Content'[Previous Month]),
        0
    ),
    (
        FORMAT(DATE(YEAR(MAX('Fact Content'[date])), MONTH(MAX('Fact Content'[date])) - 1, 1), "MMMMDD-YYYY"),
        NAMEOF('Fact Content'[Before Prev Month]),
        -1
    )
}

I have useed above script
But not getting output in correct way


Please help
Thanks in advance
1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

I hope these videos will be helpful!

Display Dynamic Column Headers in PowerBI Matrix visual MiTutorials - YouTube

Dynamic Names in Column Header is POSSIBLE Selected Year, Previous Year & Variance All - Power BI - YouTube

Dynamic Measure Names (Titles) using Field Parameters - #PowerBI - YouTube

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors