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

# Tableau Calculation (SUM, AGG ??)

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]

• ###### 1. Re: Tableau Calculation (SUM, AGG ??)

It will be helpful if you can attach the workbook.

• ###### 2. Re: Tableau Calculation (SUM, AGG ??)

Hi Yuehan,

Without seeing the workbook i'll have to make a blind guess here.

If i understand your use case, you want to display a full year's budget against a YTD budget and show the remaining budget till EoY.

Did you try using the FIX function?

I would try something like:

{FIX :sum( [Value *] else 0 end)}

This will return a fix number for a full year's budget.

If you need additional dimensions to be considered for filtering options than you can add those dimensions before the ':'