Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Why is If Then function returning 0 when true

jasontax
6 - Meteoroid

The following IF THEN function is returning 0 when true instead of 13.  Anyone have ideas on the issue?

 

IF [ST]="17" and [Sale Type]="Programming" THEN [Vertex Tax Category]= "13"
else  [Vertex Tax Category] ENDIF

4 REPLIES 4
jasperlch
12 - Quasar

Hi I believe what you want is

 

IF [ST]="17" and [Sale Type]="Programming" THEN "13"
else  [Vertex Tax Category] ENDIF

clant
8 - Asteroid

You should update it to the below and have Vertex Tax Category selected in the output column on the formula window.

 

IF [ST]="17" and [Sale Type]="Programming" THEN "13"
else  [Vertex Tax Category] ENDIF

ivoller
12 - Quasar

The logic is returning 0 correctly.

 

IF [ST]="17" and [Sale Type]="Programming"// This is TRUE

THEN // TRUE Clause

         [Vertex Tax Category]= "13" // Returns 0 (FALSE) becuase [Vertex Tax Category] does not equal 13
else // FALSE Clause

         [Vertex Tax Category] ENDIF

 

If you want to set Vertex Tax Category then use this as the Output Column in formula and use something like

 

IF [ST]="17" and [Sale Type]="Programming" THEN "13" else  [Vertex Tax Category] ENDIF

 

Cheers,

Iain

jasontax
6 - Meteoroid

Thank you!

Labels