3 Replies Latest reply on Jun 7, 2018 2:48 PM by Arron Robles

Calculated IF THEN ELSE Statement

Hello, I am trying to solve for this statement but i keep getting jammed up with no results. IS there a different way to calculate this statement? trying to convert this from an excel statement to a tableau Calc.

Excel:

=IF((E8+F8)>=I8,1,0)+IF(D8>=H8,1,0)

Tableau 10.3:

IF [NewTotalMetroE MRC]+[Sdwan Mrc] >= [Net MetroE Quota]

THEN 1 ELSE 0 +

IF [NewTotal MRC] >= [All In MRC Quota]

THEN 1

ELSE 0

END

Cheers,

Arron

• 1. Re: Calculated IF THEN ELSE Statement

Hi Arron,

Have you tried:

IF [NewTotalMetroE MRC]+[Sdwan Mrc] >= [Net MetroE Quota] THEN 1

ELSEIF [NewTotal MRC] >= [All In MRC Quota] THEN 1

ELSE 0

END

• 2. Re: Calculated IF THEN ELSE Statement

Thanks for your response. Yes, i did. i get RED squiggly line under the '>=' symbols. Error cannot mix agg and non-agg arguments with this function.

Cheers, Arron

• 3. Re: Calculated IF THEN ELSE Statement

OK, I found the issue with the AGG and Non-AGG Functions.

IF sum([NewTotalMetroE MRC])+sum([Sdwan Mrc]) >= [Net MetroE Quota] THEN 1

ELSEIF sum([NewTotal MRC]) >= [All In MRC Quota] THEN 1

ELSE 0

END

Cheers,

Arron