Alteryx Designer Desktop Discussions

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

Need assistance in Formula

Learner09
8 - Asteroid

Below is the excel formula

 

IF(AY3="SFW",IF(AD3<2500,"0-2500 EE",IF(AD3<5000,"2501-5000 EE",IF(AD3<10000,"5001-10k EE",IF(AD3<20000,"10001-20K EE",IF(AD3<50000,"20,001-50K EE",IF(AD3<100000,"50,001-100K EE","999,999 EE")))))),"")

 

I need to build the same formula in Alteryx. Please assist me

2 REPLIES 2
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @Learner09,

 

I think this is what you're trying to achieve?

 

IF [Product LOB Code] = 'SFW'
THEN IF [License Count] < 2500 THEN '0-2500 EE'
ELSEIF [License Count] < 5000 THEN '2501-5000 EE'
ELSEIF [License Count] < 10000 THEN '5001-10k EE'
ELSEIF [License Count] < 20000 THEN '10001-20k EE'
ELSEIF [License Count] < 50000 THEN '20001-50k EE'
ELSEIF [License Count] < 100000 THEN '50001-100k EE'
ELSE '999999 EE'
ENDIF
ELSE ''
ENDIF

 

image.png

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

jarrod
ACE Emeritus
ACE Emeritus

Hi @Learner09 ,

As a leader in the Alteryx Community, I have the ability to identify & mark accepted solutions on behalf of community members - and recently did so on this thread. If you have any questions or concerns with the solution(s) I selected please let me know by replying to this post.

 

@Jonathan-Sherman 's  response is correct and I just wanted to add that you can basically replace "IF" for "IIF" (the Alteryx equivalent to excel's IF statement) and it should work after you change the cell reference to the field reference. For instance, in your example you had "IF(AY2 = 'SFW'..." you can instead write "IIF([Product LOB Code] = 'SFW'..." and it has the same parameters.


As the original author, you also have the ability to mark replies as solutions! Going forward, I’d encourage you to identify the solution or solutions that helped you solve your problem, as it's a big help to other community members. Learn more about Accepted Solutions here.

Thank you!

Labels