2 Replies Latest reply on Aug 4, 2016 10:52 AM by Chi Cheng

    Two Bar Chart Comparison with Conditional Color Formatting

    Chi Cheng

      Please refer to the attached workbook.


      I want to create two separate bar charts on the dashboard. The structure of the bar chart is basically the same but they are controlled by different filters so this functionality allows people to compare different categories on the same metrics as they want.


      I want to know if there is any way that can do conditional color formatting between the two bar charts? In my workbook, if the bar chart of category 1 has higher average profit than the bar chart of category 2, then the bar chart of category 1 for average profit will change to different color. Same logic for the average sales.


      Or if there is any other workaround will be highly appreciated. For example, if it is possible to combine the two bar charts into one and still be controlled by two filters?



        • 1. Re: Two Bar Chart Comparison with Conditional Color Formatting
          Joe Oppelt

          (Version 9.2 workbook)


          You'll need to generate both amounts in one sheet to be able to compare them.


          Before moving forward, consider what I did in Sheet 4 in the attached.  It's a way to put both sets of numbers in one sheet.  This might be enough to get you going, but if this approach works and you can't get the next steps to work, let's talk about what to do next.

          • 2. Re: Two Bar Chart Comparison with Conditional Color Formatting
            Chi Cheng

            Thank you so much for the suggestion, I think this is a great way to present.


            My only left issue is how could I conditionally color format the bar charts. If it is just to compare the Avg.Profit, then I can create a calculated filed, something similar to Avg(Profit) > WINDOW_AVG(avg(Profit)) and drag it to the color marks. But now in my case I am targeting at the selected "Measure Values" and I can not do Avg(Measure Values) > WINDOW_AVG(avg(Measure Values)) in Tableau. Is there a workaround you can come up with regarding this issue?


            Thanks again