Forum Discussion
Dynamic Legend when select slicer
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 |
2 Replies
- v-henryk-mstfCommunity Support
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.- AnonymousNot applicable
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