Alteryx Designer Desktop Discussions

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

Generate rows by summing the values

BautistaC888
8 - Asteroid

Hello,

 

I need to SUM the values that contains the same [Nro ID] and generate a new row with the result.

Input:

BautistaC888_1-1625496003719.png

Expected output:

 

BautistaC888_2-1625496080362.png

 

I leave an example workflow,

 

Thank you.

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @BautistaC888 

 

Here is how you can do it.

 

workflow:

atcodedog05_0-1625498103826.png

 

1. Using record id to set order.

2. Using formula tool to remove commas and spaces in numeric field. Using select tool to convert to double.

3. Using Multi-row formula to create groupid.

4. Using summarize to get sum and set max groupid +1 for the sum row.

5. Using union tool join them back.

6. Using sort tool to sort them by order.

 

Hope this helps 🙂

KarolinaRoza
11 - Bolide

hi @BautistaC888 

 

To get sum of Total Comprobante for each Nro ID you can use Summarize tool : sum of Total grouped by Nro ID.

Then Union it with input file.

 

I notied that you also have text in other columns (but I am not sure if there is any logic behind it?), so for example you can in Summarize Tool add First by other columns so you will have first text from other columns for each group of Nro ID.

 

 

Both solutions attached.

btw I corrected manually input file (Total column), but the workflow should work on your original data. 

 

Let me know if you have any comments/questions,

Karolina

 

KarolinaRoza_0-1625498297651.png

 

apathetichell
19 - Altair

Hi @BautistaC888  I believe the attached is what you have...

 

you should be able to cut out my multi-field formula tool assuming that your numeric column is recognized as numbers. Mine does a manual transformation of "xxx.xxx,xx" to "xxx,xxx.xx" and converts to number.

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels