Alteryx Designer Desktop Discussions

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

Sum values of Field Y only if the values of Field X are 1, 2, 3, 4.

jw5560
5 - Atom

Hello-

 

I have "field Y" that has a list of categories within (1, 2, 3, 4, 5, 6, 7, 8, 9).  I have also have "field X" with a number value.

 

I want to create a formula that gives me a new field with the logic of "IF Field Y = 1, 2, 3, 4 then give me the SUM of Field X". 

 

I have been tinkering in the formula tool to give me this output, but it isn't liking my syntax.  Perhaps this isn't meant for the formula tool.

 

I hope the above makes sense.  If not let me know. Thanks for your help

1 REPLY 1
RolandSchubert
16 - Nebula
16 - Nebula

Hi @jw5560 ,

 

if I got you right, you want to replicate the SUMIFS Excel function = summarize values in a specific column if multiple conditions are met.

 

In Alteryx, it's a two step process you can describe a IFS - SUM:

 

2021-08-31_08-44-15.jpg

 

First step is to select the rows fulfilling the condition for one (ore more) columns using a Filter tool (= IFS-part), the second step is to summarize the values in a different column of all these rows.

 

The Formula tool works "row-by-row", there is no function you can use to achieve the same result.

 

Let me know if it works for you.

 

Best,

 

Roland 

 

Labels