Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Complex IF Formula

jamieeee
7 - Meteor

Hi All, 

 

I am looking to perform some detailed analysis for which I need a complicated IF Formula (unless anyone can suggest another way?). I am aware that I will need to use the Formula tool within ALteryx and create a new column but any help with the actual formula would be greatly appreciated. 

 

Aim: to show the Total Cost of the individual as long as the quantity = Current Portfolio Q. Details below.

 

Examples

1) Take Adama, if the (Quantity + Current Portfolio Q) = 0 I want to show the Total Cost of 310 in the new column. 

 

2) Similarly, using the same formula with Ben Godfrey: (200 - 200) = 0 so I would want to show the Total Cost of 166 in the new column. 

 

3) EXCEPTION: Here is where it gets tricker. Using the formula on the top Bruno Fernandes line, (89 - 111) does NOT equal 0. Hence, I would want the formula to then include the row beneath it such that ((89 + 22) - 111) = 0. I would then want to show the combined Total Cost across both lines i.e. 658 (440+218). 

 

 

jamieeee_0-1590684707310.png

 

Thank you in advance!

Jamie

 

2 REPLIES 2
markcurry
12 - Quasar

Jamie,  have a look at the attached workflow, hopefully it will point you in the right direction.

 

I'm not sure what you want to do in the case of Eddie Nketiah, where he doesn't seem to fit any of the conditions.

jamieeee
7 - Meteor

Thanks Mark, much appreciated. 

Labels