In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start 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