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
jaryszek
Memorable Member
Memorable Member

Dynamic chart title based on field parameter lakehouse

Hello, 

this is my field parameter created in onelake model :

jaryszek_0-1758896209118.png

and they are working in report:

jaryszek_2-1758896434628.png


this is connected to chart and legend is reacting for it. 
But how to write measure to have dynamic title for chart? 

I tried with:

Chart Title =
VAR sel =
    SELECTEDVALUE ( 'Subscription Hierarchy All Switcher'[Subscription Hierarchy All Switcher] )
RETURN
    "Top 5 Total Amortized Cost by " &
    COALESCE ( sel, "SubscriptionName" )


But didnt work. 
Any ideas?

Best,
Jacek






 



 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @jaryszek 

 

You cannot directly reference in a measure the field name column of a field parameter table but the other two columns. Try this:

Chart Title =
"Top 5 Total Amortized Cost by "
    & SWITCH (
        SELECTEDVALUE ( Fct_EA_AmortizedCosts[Order] ),
        1, "SubscriptionName",
        2, "NormalizedResourceGroup",
        3, "NormalizedResourceName"
    )

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

4 REPLIES 4
danextian
Super User
Super User

Hi @jaryszek 

 

You cannot directly reference in a measure the field name column of a field parameter table but the other two columns. Try this:

Chart Title =
"Top 5 Total Amortized Cost by "
    & SWITCH (
        SELECTEDVALUE ( Fct_EA_AmortizedCosts[Order] ),
        1, "SubscriptionName",
        2, "NormalizedResourceGroup",
        3, "NormalizedResourceName"
    )

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

thank you, 

i tried with: 

Chart Title Subscription Hierarchy = 
"Top 5 Total Amortized Cost by "
    & SWITCH (
        SELECTEDVALUE ( 'Subscription Hierarchy All Switcher'[Subscription Hierarchy All Switcher Order] ),
        0, "SubscriptionName",
        1, "NormalizedResourceGroup",
        2, "NormalizedResourceName"
    )

I tried to refer to Order column of parameter field table...
(first I have changed [Subscription Hierarchy All Switcher Order] columne to be integer). 

And it worked but but you need to remember to start from 0, not 1...

edit:
updated option:

VAR sel =
    SELECTEDVALUE (
        'Subscription Hierarchy All Switcher'[Subscription Hierarchy All Switcher Order],
        -1                                 -- when blank or multiple
    )
RETURN
"Top 5 Total Amortized Cost by "
& SWITCH (
    sel,
    0, "SubscriptionName",
    1, "NormalizedResourceGroup",
    2, "NormalizedResourceName",
    "SubscriptionName"                    -- default text
)



Thank you!
Jacek

 



 



wardy912
Solution Sage
Solution Sage

Hi @jaryszek 

 

 You shouldn't need to edit anything or add a measure, just enable the title on your chart visual and leave as default. If you've already changed the title, recreate the visual. If you need to change the title, edit the name of the field you've added to the chart (Highlighted in my image, as the original measure was called 'ProductCount' so I added a space).

Here I have a field parameter that chooses either Region or Category. You'll see when I select an option in the slicer, the title changes.

 

wardy912_2-1758897899364.png

 

 

wardy912_1-1758897862622.png

 

--------------------------------

I hope this helps, please give kudos and mark as solved if it does!

 

Connect with me on LinkedIn.

Subscribe to my YouTube channel for Fabric/Power Platform related content!

thank you it worked!

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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