1 Reply Latest reply on Jul 21, 2016 12:59 AM by Yuriy Fal

    How to apply sum on Already Double Aggregated Data

    Nikhil Chhazed

      Hi,

       

      I have a certain data and i have applied double aggregations on the data and have the results in this format(Thanks to Yuriy Fal).

       

      Transformations March April May June

      Same              3      2   1    0

      Ignore            0      2   2    4     

      Gain              0      0   1    0  

      Decline           1      0   0    0

       

      Now i want to apply further aggregations on the above data, im unable to do so.

      Is there a way i can do another aggregation on top of the values for each month, something like

      "Net = Gain - Decline"

       

      Transformations March April May June

      Same              3      2   1    0

      Ignore            0      2   2    4     

      Gain              0      0   1    0  

      Decline           1      0   0    0

      Net               -1     0   1    0

        • 1. Re: How to apply sum on Already Double Aggregated Data
          Yuriy Fal

          Hi Nikhil,

           

          This is the case where Excel shines, but Tableau struggles.

          What you've asking for looks like a simple calculation --

          aka 'get-this-cell-minus-that-cell-put-into-a-new-cell'.

           

          The problem with doing this in Tableau is two-fold.

          First, one should have 'a-new-cell' somewhere on a view,

          and this implies having a distinct dimension(s) value(s)

          to create such a cell, or using data densification to create

          a potential cell to fill in a value, or using custom Totals for that.

           

          Neither approach is working in this case (imho),

          because of the initial complications (right from the start)

          when making bins by the Table Calc ( [Transformations] ).

           

          So one outta "fall-back" to a dashboard approach --

          combining the bins view (that one on the Sheet 7)

          with the Net calc single-row view (that one on a Sheet 7a).

           

          Please find the attached with a dashboard like the above.

          Hope this could help.

           

          Yours,

          Yuri

           

          PS  The alternative would be to "push-down" the "binning" table calc

          to build a FIXED LOD custom bin dimension. But this would require

          re-shaping data or even doing datasource-specific coding (with Custom SQL).

          Frankly, I'm not ready to propose that kind of solution yet.