Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hello All,
I have a clustered bar chart and having different values
Sales1, Sales 2, Sales 3 .
Now I need to change the color for each bar based on thier value, But I see there is no custom color option for this chart.
Could any one suggest how to do this
Solved! Go to Solution.
Hi @Anonymous ,
Please use the IF() or SWITCH() functions to create similar measure and use it as a conditional format for visuals.
Measure =
VAR _total = SUM('Table'[Value])
VAR _colour =
SWITCH(
TRUE(),
_total>=5000 && _total<=6000,"Blue",
_total<5000, "Red",
_total>6000, "Green"
)
return
_colour
Attached PBIX file for reference.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Hi @Anonymous ,
Please use the IF() or SWITCH() functions to create similar measure and use it as a conditional format for visuals.
Measure =
VAR _total = SUM('Table'[Value])
VAR _colour =
SWITCH(
TRUE(),
_total>=5000 && _total<=6000,"Blue",
_total<5000, "Red",
_total>6000, "Green"
)
return
_colour
Attached PBIX file for reference.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
you can change the color by going to the Format your Visual then go columns and create a expression for your data bar color
Proud to be a Super User!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.