Forum Discussion

powerbiexpert22's avatar
powerbiexpert22
Icon for Impactful Individual rankImpactful Individual
19 days ago
Solved

Dynamic legends

i want to change the display name for below labels in my chart dynamically based on user selection, example if user select USD currency then labels should show as CY Actuals USD , if EUR then it shou...
  • ShahRukhSameer's avatar
    19 days ago

    Hi powerbiexpert22​,

    You can use a calculation group to dynamically change the measure format, but for the legend labels themselves, Power BI doesn't natively support changing measure names dynamically through DAX.

    One workaround is to use a field parameter, but since you don't want to use parameters, you could try using a disconnected currency table and a SWITCH() measure to control which currency-specific measures are displayed.

    However, this won't dynamically rename the legend entries in a native chart. If changing the legend text is a strict requirement, you'd need to consider a custom visual that supports dynamic series names or redesign the visual to use a dynamic category column for the legend.