8 Replies Latest reply on Sep 11, 2018 2:53 PM by Peter Fakan

    Sumifs statement in 10.5

    Jeff Labenek

      Hi All,

       

      I am new user to Tableau with a background in finance.

       

      I have created the below formula in an attempt to sum column "amount' if column "ledger" = budget and if column "account" =7820 Or "account =7831.

       

      SUM(IF [Ledger]= "BUDGET" and [Account] = 7820 OR [Account]= 7831 Then [Amount] ELSE 0 END)

       

      The formula is valid, however when looking into the data it appears that some amounts with "ledger" actual are pulling into the calculation.

       

      The second calculation is to sum the amount if account is not equal to "account" 7820 Or 7831.

       

      SUM(IF [Ledger]= "BUDGET" and [Account] != 7820 OR [Account]!= 7831 Then [Amount] ELSE 0 END)

       

      This formula is also valid, however actual values and "account" with 7820 and 7831 are pulling into the calculations. I am assuming this formula has the same error as the first.

       

      If anyone has the solution for this and could share it would be greatly appreciated.

       

      I have attached a copy of the workbook for reference.

       

      Thanks,

      Jeff