Alteryx Designer Desktop Discussions

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

Add formula to a row only based on the value

hegdepavithra10
9 - Comet

I am trying to apply formula on two columns and create another column that would hold the result.

 

hegdepavithra10_0-1604670148356.png

i used formula to achieve this. However, the formula applies it to all the rows. My formula was IF [Employee Name] = "Pavithra" and [Percentage] >0.1 then "More than 10%" else "Not achieved the threshold" endif

 

Please help

21 REPLIES 21
atcodedog05
22 - Nova
22 - Nova

Hi @hegdepavithra10 

 

Here is a workflow for the task.

Workflow:

atcodedog05_0-1604670911507.png

IF  [Employee Name] = "Pavithra" and [Percentage] >0.1 THEN "More than 10%" 
ELSEIF  [Employee Name] = "Kishore" and [Percentage] >0.6 THEN "More than 60%" 
// add more elseif for conditions
ELSE  "Not achieved the threshold" ENDIF

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

hegdepavithra10
9 - Comet

Hi, the criteria must be applied only on first 2 rows. if the first is not greater than 10% or if the second row is not greater than 60%, only then the "Ouput" must have not achieved the threshold. The 3rd and 4th row must be left null.

atcodedog05
22 - Nova
22 - Nova

Hi @hegdepavithra10 

 

I have modified the formula

Output 1:

atcodedog05_0-1604673927612.png

Output 2:

atcodedog05_1-1604673947707.png

 

Please check and let me know.

hegdepavithra10
9 - Comet

This really helped. I have an extended calculation to carry out. If i want to check if row 4 is a sum of row 1 and row 2 , how can i incorprate the same in the formula?

atcodedog05
22 - Nova
22 - Nova

Hi @hegdepavithra10 

 

Since the calculation is at row level we would need a Multi-row formula for it.

atcodedog05
22 - Nova
22 - Nova

Hi @hegdepavithra10 

 

Can you give the requirement and expected output so that i can help you out🙂

hegdepavithra10
9 - Comet
Employee NamePercentagenew field
Pavithra0.1254More than 10%
Kishore1 
Tripthi23 
Jagdish24This is a sum of row 3 and row 2

 

So this is my requirement. It can either be comment or the cell colored as red or green based on the result.

atcodedog05
22 - Nova
22 - Nova

Hi @hegdepavithra10 

 

Here is the workflow:

atcodedog05_0-1604681683928.png

I have built over the previous if statement 

[Row-1] is previous row [Row-2] 2 rows before current so on

 

Hope this helps🙂

hegdepavithra10
9 - Comet

In my previous comment, i meant can the cell be colored red or green based on the value? That is if the sum of row 2 and row 3 is equal to row 4 then the cell will be colored green, else would be coloured red

Labels