Forum Discussion
customize legends label
is there a way to customize legends label in below chart, i am using field parameters in the field of bar chart and it shows legends based on selected currency , example if user selects USD then it is showing legends in USD however i want to display without currency example , CY Actuals, PY Actuals and CY Plan etc
If you just want to show "CY Actuals" without currency, you can simply edit your field parameter and edit parameter names like below:-
CY Actuals = { ("CY Actuals", NAMEOF('Measures Table'[CY Actuals Loc]), 1), ("CY Actuals", NAMEOF('Measures Table'[CY Actuals USD]), 2), ("CY Actuals", NAMEOF('Measures Table'[CY Actuals EUR]), 3), ("CY Actuals", NAMEOF('Measures Table'[CY Actuals SGD]), 4) }π I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
π‘ Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
π As a proud SuperUserand Microsoft Partner, weβre here to empower your data journey and the Power BI Community at large.
π Curious to explore more? [Discover here].
Letβs keep building smarter solutions together!
4 Replies
- grazitti_sapna
Super User
If you just want to show "CY Actuals" without currency, you can simply edit your field parameter and edit parameter names like below:-
CY Actuals = { ("CY Actuals", NAMEOF('Measures Table'[CY Actuals Loc]), 1), ("CY Actuals", NAMEOF('Measures Table'[CY Actuals USD]), 2), ("CY Actuals", NAMEOF('Measures Table'[CY Actuals EUR]), 3), ("CY Actuals", NAMEOF('Measures Table'[CY Actuals SGD]), 4) }π I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
π‘ Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
π As a proud SuperUserand Microsoft Partner, weβre here to empower your data journey and the Power BI Community at large.
π Curious to explore more? [Discover here].
Letβs keep building smarter solutions together! - Ritaf1983
Super User
Hi powerbiexpert22,
If you need full control over the legend labels, I would not try to force it through the built-in legend. The native legend is still quite limited in terms of customization.
A practical workaround is to switch the chart legend off and create your own legend using another object β for example, a small table/matrix, text boxes and/or shapes.
This gives you complete control over the displayed text, so instead of CY Actuals USD / PY Actuals USD / CY Plan USD, you can simply show CY Actuals / PY Actuals / CY Plan, regardless of which currency measure is selected by the field parameter.
The custom legend can also be made dynamic with DAX and conditional formatting if needed.
I demonstrated the same general approach here:
How to hide legend of a stacked column chart β custom legend exampleIn that example I used a small table plus conditional formatting to generate the legend manually. The exact requirement is different, but the technique is the same.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- v-saisrao-msft
Community Support
Have you had a chance to review the solution shared by grazitti_sapnaβ, Ritaf1983β? If the issue persists, feel free to reply so we can help further.
Thank you.
- v-saisrao-msft
Community Support
Checking in to see if your issue has been resolved. let us know if you still need any assistance.
Thank you.