2 Replies Latest reply on Aug 6, 2018 7:48 AM by Elad Lanir

    Tableau Calculation (SUM, AGG ??)

    Yuehan Guo

      Hi,

       

      I have created two measures Baseline 1 FY and Baseline 2 FY. (Baseline 1 is always the full year budget, and Baseline 2 is the actual expenses. So actually Baseline 2 FY really equals Actual YTD)

       

      The "Left" column is supposed to show the remaining budget for the rest of the year, so it should be FY budget minus Actual YTD. But When I used formula: [Baseline 1FY] - [Baseline 2 FY], it always return the FY budget number.

       

      Anyone has any suggestions?

       

      Thanks,

       

       

      Baseline 1 FY: sum(if [Baseline]= [Para_Baseline1] AND [Para_Month]= [Comment_Date] THEN [Value *] else 0 end)

       

      Baseline 2 FY: sum(if [YearMonth] >= [CurrentFiscalYear]+'-04-01' and [YearMonthDate] <= [Para_Month]  and [Baseline] = [Para_Baseline2]

      then [Value *] else 0 end)/1000000

       

      Left: [Baseline 1 FY]-[Baseline 2 FY]