1 Reply Latest reply on Aug 31, 2018 12:35 AM by Santiago Sanchez

    Graph the Difference between Bars

    Randolph Ralph

      I am not sure if it is possible to do this in Tableau Desktop, but I am curious if it is possible to display the difference between bars on a graph in red (increase from 2018 to 2019) or green (decrease from 2018 to 2019). Here is a demonstration on what I am attempting to do.




      Attached a copy of my workbook.


      Thank you,


        • 1. Re: Graph the Difference between Bars
          Santiago Sanchez

          Hi Randolph,


          I think it's going to be difficult to do this with the current structure of the data. If you are able to have a column called [Year] with 2 values, instead of a different column for each year, you can do something like the workbook attached.



          You first need to create a calculated field that finds the Maximum value between the 2 years:

          When used on the the view, make sure it's computed for each panel:


          Notice we are also using a dual axis, which allows us to add color/text only to the difference bars. You may need to move the primary measure in front of the Max Value:


          You can see the calculations for Color and Text on the workbook attached, but you can use them on the 2nd axis. Make sure they are also computed for each panel:


          Hope this helps!