We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Conditional IF statement in Alteryx

AhanaR
7 - Meteor

Hi Team,

 

Could someone help in replicating this formula to Alteryx? I'm adding two criteria to calculate the Price and this is how I would write the formula in excel (replaced cell numbers with col names) I tried to write the same logic in alteryx, but it was giving me an error at greater than symbol.

 

 

IF(OR(ASP(Local)="",Unit Price In Backlog =""),0,IF(OR(Price Times<0.5,Price Times>5,Volume Exclusion="Yes"),0,(Unit Price In backlog-ASP(Local))*Backlog Quantity in Base Unit))

 

 

3 REPLIES 3
AhanaR
7 - Meteor

Dataset Used :

Unit Price In BacklogPrice Timesvolume exclusionBacklog Value in Document CurrencyASP (Local) Backlog Quantity in Base Unit
7247.691.18NO7247.691501
3692.31 NO3692.312401
17.030.86NO136.241638
54.821.04NO54.82901
9.351.18NO215.0540523
ShankerV
17 - Castor

Hi @AhanaR 

 

Please use the below.

 

IF [ASP(Local)]="" OR [Unit Price In Backlog] =""
THEN 0
ELSEIF [Price Times]<0.5 OR [Price Times]>5 OR [Volume Exclusion]="Yes")
THEN 0
ELSE ([Unit Price In backlog]-[ASP(Local)])*[Backlog Quantity in Base Unit]
ENDIF

ShankerV
17 - Castor

Hi @AhanaR 

 

One way of doing this.

 

ShankerV_0-1677590101860.png

 

ShankerV_0-1677590164354.png

 

IF Isnull([ASP (Local) ]) OR Isnull([Unit Price In Backlog])
THEN 0
ELSEIF [Price Times]<0.5 OR [Price Times]>5 OR [volume exclusion]="Yes"
THEN 0
ELSE ([Unit Price In backlog]-[ASP (Local) ])*[Backlog Quantity in Base Unit]
ENDIF

 

Note: Data cleansing and select tool are to normalize the data in the dataset.

 

ShankerV_0-1677591278197.png

ShankerV_1-1677591289269.png

 

 

Many thanks

Shanker V 

Labels
Top Solution Authors