Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hello,
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!
Solved! Go to Solution.
I figured it out, I needed to add a legend with the same column I was conditionally formatting with.
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.
I figured it out, I needed to add a legend with the same column I was conditionally formatting with.
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.