1 Reply Latest reply on Oct 7, 2013 2:25 PM by Tracy Rodgers

    % of total calculation help...

    Muralidharan M

      Hi...Great work there in Tableau and thanks for all the support.... I am having a bit of frustrating time because I have this cross tab view...

       

      HC is Sum(Records); Att is sum(records)
      HC2256225622782263
      Att20154165

       

      The table(above) displays Headcount and Attrition for the first four months.

       

      HC remains the same; Running Total Attrition
      HC2256225622782263
      Att204575110
      Att %11%12%13%15%

       

      From there I created a second table that showed Headcount over the months; while having running total on Attrition.

       

      Then, I tried doing a Year to date Attrtion % as RUnning TOtal(Attrition count)/total(Headcount * 12 / current month (see below)

       

      Att %11%7%5%5%

       

      Now this is where my problem is I am not able to the Attrition %; Tableau wont let me divide headcount but, makes it running total of attrition/ run ning total of Headcount. It is so, frustrating. Can somebody help me with this?

       

      PS: I tried creating a duplicate database and dividing Headcount by duplicate database using Sum(if [reports] = "HC" then 1 else 0 end). This worked really fine but, I have got more 10 filters in the page and for some reason, the data blending gets scewey dewey afer 3-4 joins.

       

      Appreciate any help guys can throw my way. This is last formulae I tried.

       

      If attr([Report]) = "Att" then running_sum(SUM([Number of Records])) else SUM([Number of Records]) end

      /

      lookup(zn(sum([Number of Records])))

       

      I thought the lookup would take the absolute values of Headcount as I have given in the pane. I am not sure why it goes blank or does a running total.