Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

If Statement - Wrong Output

Kristie_Pires
8 - Asteroid

Ignore this - I figured out what I was doing wrong!! (Not sure how to delete this post lol) 

 

I am trying to write the following if statement:

 

If [Status] = 5 then [Amount] = 0 else [Amount] endif 

-- meaning anything with a status code of 5 should have an amount of zero; if the status is not 5, give me the amount in the "amount" column.

 

However, this is happening: the amount is coming as -1 when the status is 5. Not sure if this is because the original amount was already zero on this instance.

 

Any help would be much appreciated. 😊

3 REPLIES 3
MarqueeCrew
20 - Arcturus
20 - Arcturus

@Kristie_Pires ,

 

so close!

 

If [Status] = 5 then 0 else [Amount] endif 

 

 

just use that in a formula tool with the field set to amount. 

cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Kristie_Pires
8 - Asteroid

Thank you, Mark!!

MarqueeCrew
20 - Arcturus
20 - Arcturus

You're very welcome @Kristie_Pires !

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels
Top Solution Authors