Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello everyone,
Currently, I have a dashboard to count to the number of each rate appears in a year like scr below
What I want is that when I select year 2022 or (both year 2022 and 2021), the legend name with appear like this
A --> Good
B --> Average
C --> Bad
But when I select only 2021, it still keeps as it is (A,B,C).
Please advise me on this.
Thank you so much
My data:
year rate
| 2022 | A |
| 2022 | B |
| 2021 | A |
| 2021 | A |
| 2021 | B |
| 2021 | C |
| 2022 | B |
Hi @Anonymous ,
You can create calculated column like below and add it to the legend of visual.
legend_ =
IF (
test[ rate] = "A",
"Good",
IF ( test[ rate] = "B", "Average", IF ( test[ rate] = "C", "Bad" ) )
)
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for your reply.
But what I want is when 2022 is selected (select alone or select both 2021 and 2022) the legend is (Good, Average, Bad),
When it is not selected, the legend is A,B,C
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!