Skip to main content
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
smithmpi
Frequent Visitor

Top 3 Conditional Formatting Bar Chart

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")

smithmpi_0-1707806564994.png

 

1 ACCEPTED 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.

 

talespin_0-1707888631397.png

 

View solution in original post

6 REPLIES 6
talespin
Solution Sage
Solution Sage

Hi @smithmpi 

 

If possible please share pbix file will any sensitive data removed.

@talespin pbix inbox

talespin
Solution Sage
Solution Sage

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. 

 

talespin_0-1707888287528.png

 

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_0-1707888631397.png

 

@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.

@smithmpi 

 

You're welcome.

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (25)