Missed the Q4 Fall Release Product Update? Watch the on-demand webinar for more info on the latest in Designer 24.2, Auto Insights Magic Reports, and more!
Free Trial

Alteryx Designer Desktop Discussions

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

IF Function based on percentage

sheetalk1234
6 - Meteoroid

Hi Alteryx Community,

 

I am really struggling with a formula and need your help/suggestion for it.

 

Query is- If missed savings is less than 20.00%, it is COMPLIANT and if greater than 20.00% then non-compliant. 1 thing to make sure is criteria should be exact 20.00%.

 

Kindly help!

Thanks

2 REPLIES 2
MRod
8 - Asteroid

This depends on how you label when it's equal to 20.00%.  If 20.00% is considered compliant then the following should work: 

if [Savings]<=.2 then "Compliant" else "Non-Compliant" endif

If considered not-compliant then you can remove the = sign. Additionally, if you want to have an additional label for exact matches you can add an elseif :

if [Savings]<.2 then "Compliant" elseif [Savings]=.2 then "Exact" else "Non-Compliant" endif

 

*Assuming Savings is numeric. Please see screenshot of test variables.

sheetalk1234
6 - Meteoroid

Thank you so much, this clears my doubt! :)

 

Labels
Top Solution Authors