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

Need some help writing Conditional Formulas

JPAEP
7 - Meteor

I'm sure this is probably pretty easy, but I'm struggling with the "1" in the middle of the formula. But how would I write this in Alteryx?

 

=IF(O2-K2=0,1,(O2-K2))

 

Thanks in advance!
Jordan

17 REPLIES 17
IraWatt
17 - Castor
17 - Castor

@JPAEP you definitely can. Would you be able to give a quick example table with your variables and desired output?

grazitti_sapna
17 - Castor

@JPAEP, try this.

 

grazitti_sapna_0-1654691916706.png

 

Thanks!

Sapna Gupta
JPAEP
7 - Meteor

So essentially, even though these were finished the same day, I would still want a 1 in the scheduled days to Work Column. So the calc I had was right, just need extra to make it more correct.

 

JPAEP_0-1654692196291.png

 

JPAEP
7 - Meteor

That would work, but I need it in one condensed formula if possible.

IraWatt
17 - Castor
17 - Castor

Ah thanks @JPAEP, looks like @grazitti_sapna has already sorted that logic for you.

grazitti_sapna
17 - Castor

Hi @JPAEP, try this

 

IIF(DateTimeDiff([CON Finish],[CON Start],'days')=0, 1, DateTimeDiff([CON Finish],[CON Start],'days'))

 

grazitti_sapna_0-1654692519819.png

 

Thanks!

 

Sapna Gupta
JPAEP
7 - Meteor

Awesome! Thanks to you and @IraWatt for your help.

grazitti_sapna
17 - Castor

@JPAEP , Glad me and @IraWatt  were able to resolve your query.

 

Thanks!

Sapna Gupta
Labels
Top Solution Authors