Alteryx Designer Desktop Discussions

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

Data calculation using Formula tool

soumya
7 - Meteor

I am using a formula tool to claulate the spend. But there are certain rows for which I do not want it to calculate the cost. The way I can identify these line line item is becuase they contain a certain word. 

 

I am currently first calculating the spend for all and then trying to use a formula tool to make the spend 0 for only the lines I dont need spend for. How can I use a formula tool to say if my x coulmn containd "makegood" then make the spend 0? 

 

Not sure how to add this piece back into my workflow

2 REPLIES 2
JohnJPS
15 - Aurora

Sure, just select the existing Spend column in the formula as your output field, and use the expression:

 

IIF([x]=="makegood",0,[Spend])

 

 

So basically Spend is updated to 0 when x="makegood" otherwise it is unchanged (updated to itself).

soumya
7 - Meteor

Thanks a ton! it worked :)

 

Labels