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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply

How to get dynamic measure to update Legend on bar chart

Hi there,

I have created a dynamic measure that will give me results based on the slicer selected. The measure is working as suspected, but I would like the legend to also change based on what is selected on the slicer

 

 

Formula

 

DynamicMeasure =

    SWITCH(

        SELECTEDVALUE('vCorporateGandA'[LedgerType]),

        "Actual", [Current Month Actual],

        "Budget", [Current Month Budget],

        BLANK()

)

 

Chart:

The slicer is on "Budget" so I would like the yellow bar to show "Budget" instead of "DynamicMeasure"

 

brittanyruffin_0-1706546525428.png

 

 

3 REPLIES 3
v-kongfanf-msft
Community Support
Community Support

Hi @brittanyruffin ,

 

It is not possible to add a measure as bar chat legend, as measure actually returns a single value.

 

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Daniel29195
Super User
Super User

@brittanyruffin 

try using field parameters .

 

https://www.youtube.com/watch?v=-nqEv2YXLsUe

 

 

 

If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution !

It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

I will have 3 different charts that need to filter at the same time. I have 2 other charts for QTD and YTD. The field parameters didn't work for me

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.