Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello,
Cant change the colour on bars(Clustered column chart) when i use axis, Legend and values at the same time
Source data
| CollegeName | Class | noofstudents | 
| ABC | FY | 60 | 
| ABC | SY | 80 | 
| ABC | TY | 50 | 
| XYZ | st | 40 | 
| XYZ | nd | 70 | 
| XYZ | rd | 30 | 
I have added clusterd column char on page and use class as axis , college name as legend and values as noofstudents
i want to change colour of bars when nofostudents greater than 60 then it should be green bar, and less than 60 it should be red bar.
Thanks
Solved! Go to Solution.
Hi, @Anshenterprices 
Remove the field from the legend, then create a measure for the color rule like below
_Color =
SWITCH (
    TRUE (),
    MAX ( 'Table'[noofstudents] ) > 60, "Green",
    MAX ( 'Table'[noofstudents] ) < 60, "Red"
)
Apply the above measure to the data color of the format field
Please refer to the attachment below for details
For reference:
https://community.powerbi.com/t5/Desktop/Changing-bar-colour-based-on-a-Bar-graph/m-p/1153281
Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anshenterprices
Can you please elaborate on what you are trying to achieve?
If you want to change the color of the table bar, just to change the bar color in the Format field
Hope this helps
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello,
Cant change the colour on bars(Clustered column chart) when i use axis, Legend and values at the same time
Source data
| CollegeName | Class | noofstudents | 
| ABC | FY | 60 | 
| ABC | SY | 80 | 
| ABC | TY | 50 | 
| XYZ | st | 40 | 
| XYZ | nd | 70 | 
| XYZ | rd | 30 | 
I have added clusterd column char on page and use class as axis , college name as legend and values as noofstudents
i want to change colour of bars when nofostudents greater than 60 then it should be green bar, and less than 60 it should be red bar.
Thanks
Hi, @Anshenterprices 
Remove the field from the legend, then create a measure for the color rule like below
_Color =
SWITCH (
    TRUE (),
    MAX ( 'Table'[noofstudents] ) > 60, "Green",
    MAX ( 'Table'[noofstudents] ) < 60, "Red"
)
Apply the above measure to the data color of the format field
Please refer to the attachment below for details
For reference:
https://community.powerbi.com/t5/Desktop/Changing-bar-colour-based-on-a-Bar-graph/m-p/1153281
Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anshenterprices , Conditional formatting is not supported with legends as of now.
You can log a new idea or vote for an existing one. https://ideas.powerbi.com/ideas/
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.