Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

IF Condition with OR , and formula for calculation %

Vicky92
7 - Meteor

Hi Team,

 

I want to apply IF condition statement in my working. IF the condition is met the result should be updated with a specific word ("TA").

 

" IF Condition Statement = IFERROR(IF(OR(B2/$L2>=$A$16,B2/$B$12>=$A$16),"Pass",""),"") "

 

Request you to please me in framing the above conditional statement in Alteryx workflow.

 

I have attached working file for reference.

3 REPLIES 3
T_Willins
14 - Magnetar
14 - Magnetar

Hi @Vicky92,

 

Using a Transpose tool with Filter and Join tools puts the data in a format where all subjects can be tested with a single formula.  A Cross Tab tool and a Select tool put the data back into your desired output.  The RecordID tool at the beginning is just to sort the names into the original order.

 

 

IFs condition with OR.jpg

 

Qiu
20 - Arcturus
20 - Arcturus

@Vicky92 
Something different with @T_Willins . Hope this is what you need.

BTW, are you interested to submit this one as a candinate of the coming weekly challenge topic? given it is not from the Cert. exam.

1119-Vicky92.PNG

estherb47
15 - Aurora
15 - Aurora

Hi @Vicky92 ,

 

@Qiu  and @T_Willins  have provided wonderful solutions.

Here's another way to look at it, turned into an app so that you can interact and choose the threshhold dynamically

The Record ID and the Tile tools are for rebuilding the table back into the original order. Dynamic rename at the end removes the numbers from the headers (otherwise Alteryx alphabetizes for you)

EstherB47_0-1605753493098.png

 

Summarize the rows and columns separately, so that we have totals by person and totals by subject. Join those totals back into the original data set (matching once on person and once on subject). A formula tool tests whether the scores divided by each total exceed or meet the threshhold. You can use the OR logic right within the IF condition, so IF A>=B OR A>=C THEN "Pass" ELSE "" ENDIF. etc/

A crosstab rebuilds the table.

 

A numeric up/down lets the user of the app interact with what the threshhold should be. This outputs to a temp alteryx database, and you can change that output file type to whatever works for you.

 

Let me know if this helps.

Cheers!

Esther

Labels