Alteryx Designer Desktop Discussions

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

IF Condition

suby
11 - Bolide

Hi All,

 

I'm using simple Formula tool to define a IF Statement where it checks for condition for M1 and M2 and the issue I'm facing is the second Condition is classified into bucket 'OTHER' is there a way to show both M1 and M2 flag under Metrics column.

 

Attached sample WF.

 

Thanks

5 REPLIES 5
Prometheus
12 - Quasar

@suby You can change the first condition in your expression to this: [STATUS] = 'Live' and
[SEVERITY] = 'Very High' and [CUSTOMER RATING]!='X'

 

However, there are no records that meet this condition.

ed_hayter
12 - Quasar

As i read your current conditional statement something cannot be just M2 as to be M2 it has to satisfy M1 requirements. On the other hand something can be just M1 if the Customer rating is not X. Then everything else is other.

 

So if what you want is M1 and M2 to show I would put the M2 requirement first in the conditional so the first check looks for those that satisfy that requirement and then change the statement to M1 and M2 as if it is M2 it is also M1. Then in the elseif I would check for jut M1s so looking through only the ones that have failed the first test are there any M1 onlys. Then check for Other.

 

image.png

 

A conditional will assign to the first bucket where the test is passed so in your original structure as all M2s are M1s there were no cases to assign to it on the second test condition

suby
11 - Bolide

Thanks so you mean to say I will be getting M1 & M2 and OTHER is that right ?

ed_hayter
12 - Quasar

With the modified IF statement and the data as is you will get M1 & M2 and Other. If the data changes and there is a record that satisfies M1 and M2 then they will be classified as M1. My logic  does not include anything for assigning just M2 because in order to be M2 you are required to meet the spec to be M1 hence "M1 & M2"

binuacs
20 - Arcturus

@suby One way of doing this

image.png

Labels