3 Replies Latest reply on Aug 16, 2018 12:23 AM by Lotte Van Doorss

    Turnover calculation via sumproduct?

    Lotte Van Doorss

      Hello,

       

      I'm trying to calculate turnover. A simple table to explain is found below.

      I have Price and I have Volume.

      Price is already a calculation of 3 fields (Formula: zn(Field1)+zn(Field2)+zn(Field3)).

      When I calculate turnover, I have to take sum(Price)*sum(Volume) or it gives me an aggregate error ("cannot mix aggr and non-aggr...").

      If I keep article level in my table, it's not problem. But when I take it out, it calculates it as (2.8+2.1+104)*(400+900+20), which gives 535.788.

      In Excel I would use a sumproduct, but I don't know how to fix this in Tableau?

       

          

      ArticlePriceVolumeTurnover
      A2,8 4.000   11.200  
      B2,1 900   1.890  
      C10420   2.080  
      15.170

       

      Many thanks!

      Kr,

      Lotte