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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Not applicable

Color bar chart based on value in another table & column



Is there a way to color a bar chart's bars based on values in another table & column? I have one table which displays fault codes and their occurrences, and another table that relates those fault codes to fault levels. 


I have tried conditional formatting and creating DAX measures, but each of those wants me to aggregate the fault level column. which I do not need. Essentially I need conditional formatting along the lines of (in pseudocode):

if fault_level = "0 - No Reaction", color those bars blue, else if fault_level = "1 - Dash Telltale Only", color those bars green, else if fault_level = "2 - Torque Limited to 35%", color those bars yellow, else if fault_level = "3 - Zero Torque", color those bars orange, else if fault_level = "4 - Vehicle Shutdown", color those bars red.


For example, if fault 234 has a fault level of zero, I want that bar to be blue. If fault level has a fault level of 3, I want that to be orange.


Please see the screenshots below.




I tried conditional formatting, but the summarization is not needed and it won't let me conditionally format without it.


Any help would be deeply appreciated!

Not applicable

I figured it out, I needed to add a legend with the same column I was conditionally formatting with.

View solution in original post

Super User
Super User

Does it work with that summarization? Usually as long as the summarization doesn't do something you don't want it to be doing, it's fine to let it do its thing. In this case, if it's getting the first fault level, and you have a rule for each fault level, I'd expect it to work fine assuming your relationship is flowing in the right direction. 

Not applicable

I figured it out, I needed to add a legend with the same column I was conditionally formatting with.

Not applicable

It does not, unfortunately. The bar chart in the attached screenshot in my previous post is the result of the conditional formatting I also screenshotted in the previous post. Initially, the bar chart was a darker blue.

Helpful resources

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.


Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.