1 Reply Latest reply on Mar 19, 2018 11:57 AM by Joe Oppelt

    Nested calculations - Grand total

    Ganesan  karuppasamy

      Hi All,

       

      I am trying to calculate a custom grand total in tableau for the below mentioned fields.  Consider we have Columns a, b and the calculation should be like

       

      column A * column B at row level and window sum of this value / Window sum of column A. I tried using the below mentioned way

       

      if size() >1

      then

      MAX(column A)

      ELSE

      WINDOW_SUM(sum(column A) * sum (column B)/WINDOW_SUM(column A) ])

      END

       

      But getting the incorrect result which is same as the output of below mentioned calculation.

       

      Window_sum (column A) * window_sum(column B)

       

      Can anyone help me on this ?

       

       

      Thanks,

      Ganesan k.