Free Trial

Alteryx Designer Desktop Discussions

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

Perform a Sum IF in Alteryx

PNiccolo
7 - Meteor

Hi everyone!

I am trying to replicate a SumIF (i guess) in Alteryx.

As you can see in the picture, I have in the first column an Item Code, in the third a number representing a transaction quantity and in the fifith the total quantity after the transaction.
I want to create a new column with the sum of all the transaction quantities for any give item code. For example, for the item in the picture I want to have a new column that, for each of the 7 rows with that Item Code, shows the results of all the transactions in the third column (49 in this case)

PNiccolo_1-1572853496302.png

Do you now how I can replicate this in alteryx knowing for any given item I might have from 2 to potentially infinite transactions?

Thank you for your help!

3 REPLIES 3
Martyn
9 - Comet

Use the summarize tool to create your totals grouped on item code. Then join this with your original table (using the item code).

 

PNiccolo
7 - Meteor

Hi Martin,

 

thank you for your help. It worked perfectly but with three exceptions

PNiccolo_0-1572860229585.png

For three items with transaction history that looks like this (final transaction is negative) the tool gives me 4 rather than 2 as a result.

I set the tool in this way:

PNiccolo_1-1572860349995.png

 

Do you have any clue with these three items are acting like this?

Thanks!

Martyn
9 - Comet

I would add a Count into the summarize tool - to check it is adding all 5 Transaction Quantities together.

 

My thought is that there may be leading spaces on some of the item codes. Adding the count would highlight this.

Labels
Top Solution Authors