2 Replies Latest reply on Sep 20, 2017 12:52 PM by Joe Oppelt

# Help with Calculation field.

Hello,

I'm looking for help with a calc.

I have 2 parameters called, PWV and Factor(PFA Excel sheet).

I want to come up with a formula for my Sale such that if PWV and Factor combination is so and so and date year is 2017 the sale value should show up.

I want the sale yearly total to be extracted from the parameter.

So, I want to say

( if PWV = 1.43 and factor = 16.4 and year(date new) = 2017 then give me 235896 ).

I'm using tableau forecasting and hence I'm unable to calculate the  year end totals using table calc. I also don't have 'Sale' field in my data, hence using 235896  as an int. Please let the sale value be an int and not sum(sales).

• ###### 1. Re: Help with Calculation field.

Assuming [Date New] is coming in as a date field, then it's straightforward.

IF [PWV] = 1.43 and [Factor] = 16.4 and year([date new]) = 2017 then 235896  END

Just be careful about PWV.  The value Tableau sees might be .0134, not 1.43.  You can tell by displaying it on a sheet.

• ###### 2. Re: Help with Calculation field.

So you'll get a value on each row.  Either 235896 or null.