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

is it possible to formulate if statement something like " if c then (t + w) else f "

acaryasin01
8 - Asteroid

Hello, 

 

is it possible to formulate if statement something like " if c then (t + w) else f "

Or is there another solution to find desired outout?

 

I am trying to create a something like "If c then (t + w) else f ."

 

if [Quata]-[Count]<=0 then ([Quata]-[Count]) & "Exceeded" else Not Exceeded endif

 

I want to return a Quata Control based on the values in three columns.

 

CostomerCountQuataQuata Control
A2330Not Exceeded
B15105 User Exceeded
C514 User Exceeded

 

 

I know I can do it by adding two more column then concatenate them. but I wonder If there is another simple solution!

 

CostomerCountQuataQuata OverrunOver run Y/NQuata Control
A233010Not ExceededNot Exceeded
B1510-5Exceeded5 User Exceeded
C51-4Exceeded4 User - Exceeded

 

Any help would be appreciated

4 REPLIES 4
atcodedog05
22 - Nova
22 - Nova

Hi @acaryasin01 

 

You can use single formula like this

 

 

IF [Quata]-[Count]>=0 THEN "Not Exceeded" 
ELSE ToString(ABS([Quata]-[Count]))+" User Exceeded" ENDIF

 

Workflow:

atcodedog05_0-1629731196622.png

 

 

Hope this helps : )

Luke_C
17 - Castor
17 - Castor

Hi @acaryasin01 

 

This formula should do the trick - you need to use a tostring function on the number in order to get it to play nicely with the text.

 

If [Quata]-[Count]<=0
then tostring(abs([Quata]-[Count])) + " Exceeded"
else "Not Exceeded"
endif

 

Luke_C_0-1629731148226.png

 

 

acaryasin01
8 - Asteroid

Wonderful👌👌👌

 

It works. Thank you so much 👍

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @acaryasin01 

Cheers and have a nice day!

Labels
Top Solution Authors