1 Reply Latest reply on Nov 16, 2016 3:09 PM by Marc MOUSSA

    Sum different KPIs

    Paula Garzon

      Hi community,

      I am not so expert in Tableau and got a problem. I have a set of KPIs in which consist of the sum of specific criteria for each.

       

      This is the desire out.

       

           3                         4              2            1                  10

      Operations        Finance        HR       Production      Total

       

      I have created each one individually using filters. Each KPI has different conditions so I can't apply the same filter to all of them.  The problem is when I want to calculate the total. I have tried if conditions in calculated fields but didn't work.

       

      This are the conditions to calculate each KPI

       

      Operations KPI: Countd(ID) when Filter Div=Operations --> the result is 3

      Finance KPI : Countd(ID) when Filter Dept=Finance--> the result is 4

      HR KPI: Countd(ID) when Filter Dept=HR--> the result is 2

      Production KPI:  Countd(ID) when Filter Dept=Production and Title=Manager --> the result is 1

       

      I want to create a calculated field that gives me 10 which is the total sum of the KPIs. Any insight on how to do this? I'm attaching the data set, the workbook and the output I want as well.

      Any help is most appreciated!

       

      Thank you,

      Paula

        • 1. Re: Sum different KPIs
          Marc MOUSSA

          First you need to create the 4 fields

          Operations KPI: COUNTD(IF [DIV] = 'Operations' THEN [ID] END)

          Finance KPI : COUNTD(IF [DIV] = 'Finance' THEN [ID] END)

          HR KPI: COUNTD(IF [DIV] = 'HR' THEN [ID] END)

          Production KPI: COUNTD(IF [DIV] = 'Operations' AND [Title]='Manager' THEN [ID] END)

           

          And now you toal KPI is the sum for the 4 above ones.

           

          No need to filter anymore on DIV or Title to get the good results.