1 Reply Latest reply on Sep 15, 2016 9:43 AM by David Li

    Difference between two subtotals

    David Freifeld

      Tableau 9.9.png

       

      A user is using the workbook w/screenshot attached, and I'm trying to find the difference of the bold red Total row and the bold blue Total row. I did manage to do this within the blue Total row - in column "Week 4," for example, -256 is the difference between 1056 and 800. But I want that to be in a separate row , ideally a row that I could label something like "difference."

       

      I feel like this should be a really easy thing to do, but I just can't see how to do it... Shouldn't there be a way, similarly to Excel, to insert a row with "=A-B" or something along those lines?

        • 1. Re: Difference between two subtotals
          David Li

          Hi David! Unfortunately, that isn't really how Tableau works. Excel is way more flexible than Tableau is, especially when it comes to editing individual cells. While you can micromanage cell contents in Excel, you can't in Tableau. Tableau's cells are more like products in a chemical reaction: you can use different reactants and processes to create different batches of chemicals, but you can't really change individual molecules.

           

          The easiest way to give you what you want is just to create a separate worksheet for the difference calculations and put it underneath this one in a dashboard. Otherwise, you could try enabling grand totals and using some fancy table calculation tricks to fine-tune what the grand total displays.