Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
Here's two measures that are used to highlight the top 3 responses in the bar chart below. The measure works but it's including values outside the top 3 (highlighted in "green"). How do I fix this? Appreciate any tips please.
Top 3 Reasons For Leaving =
VAR CurrentReason = SELECTEDVALUE('Survey Exit Data'[Q7: What is the main reason you decided to leave?])
VAR TopReasons = TOPN(3, ALL('Survey Exit Data'[Q7: What is the main reason you decided to leave?]), [Total Completions], DESC)
RETURN
IF(
CurrentReason IN TopReasons,
1,
0
)
Top 3 Reasons Leaving CF =
IF([Top 3 Reasons For Leaving] = 1, "#D5E6A5", "#54B9AD")
Solved! Go to Solution.
hi @smithmpi
Figured the problem. If you set the color manually for any specific category and then select "All" and try to use formula, it will not override the colors you set manually. I don't know how to clear manual color selection. Try creating a new chat and don't select any colors manually.
hi @smithmpi ,
There is nothing wrong with DAX. The color is coming from somewhere else. I changed the color to red/blue.
Also I created another visual and works perfectly fine with the measures you shared. I am not able to figure out the reason for problematic columns.
hi @smithmpi
Figured the problem. If you set the color manually for any specific category and then select "All" and try to use formula, it will not override the colors you set manually. I don't know how to clear manual color selection. Try creating a new chat and don't select any colors manually.
@talespin it worked after creating a new visual. At least I know it had nothing to do with the measure. Thank you so much for clarifying, appreciate it.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |