1 Reply Latest reply on Aug 23, 2016 11:36 AM by Patrick Van Der Hyde

    Calculo Geral

    Jan Paulo salvador

      Estou precisando montar a seguinte solução no Tableau, porem não estou conseguindo. Nessa solução preciso saber a presença (%) de cada produto.

      Nesse caso a presença de Grego é de 100% e de requeijão apenas 50%



        • 1. Re: Calculo Geral
          Patrick Van Der Hyde

          Hello Jan Paulo,


          See the attached example workbook (you didn't mention version of Tableau so this is version10).


          I created the following:


          if sum([Resposta Realizada])>0 then 1 else 0 END  - to show the same calculation of 1 or zero based on the value of Responsta Realizada - this gives the numerator


          Then I countd the values of Loja that are unique per Categoria - window_sum(countd([Loja]))  - this gives the denominator for calculation.


          Then we create the combined calculation.


          The table calculation functions in the view are set to utilize the filed of Loja for the Compute Using since the Categoria field acts as a Dimension to partition the values.


          On the "Final Result" tab, I have thrown in one more calculation - "if first()=0 then.... "  and I have done this so that we only return the percentage Reposta once per Categoria to make it look like the Excel report.



          I hope this helps out.



          1 of 1 people found this helpful