Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Sum every 'X' number of Rows- Multiple Columns

ScubaGeekNV
6 - Meteoroid

Hello.

 

I have a data pull (below image) where I would like to sum every 7 rows across all column (the number of columns will not remain constant).

 

I am pretty positive this can be obtained using the Multi-Row tool, however I am not figuring out the Expression for the sum and I am not sure how to handle the dynamic number of columns aspect.

 

 

 

Multi-Row.png

4 REPLIES 4
OTrieger
14 - Magnetar

@ScubaGeekNV 
I think that using Multi Row Formula tool would be too complex to get it done, nevertheless you can try to go with that solution.

I think that it will be easier the create flags that indicating 7 rows, Flag 1 from 1 to 7, flag 2 from 8 to 14 etc. Then use Cross Tab tool or Summarize tool to get the values sum up.

Or you can use batch macro to get it done.

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

@ScubaGeekNV ,

 

Here is a sample workflow. (It's the same as @OTrieger 's 1st idea.)

I hope this helps.

 

Workflow

SumEveryX_wf.png

 

Output

RowNoabcdeGroup
147849873761
275571710601
322275792601
488415776341
579237856641
6278122581
72759653381
Total3403884053623901
875897157402
910982799472
1078549223992
1178359818362
122144433782
1371411451242
1423656922232
Total3564263753033472
flying008
15 - Aurora

Hi, @ScubaGeekNV 

 

Another way like @Yoshiro_Fujimori .

 

录制_2024_11_01_08_23_16_657.gif

ScubaGeekNV
6 - Meteoroid

Glad to here the Multi-Row tool would be too complicated, now I do not feel bad for not figuring that option out! LOL

 

This solution works perfectly! Thank you for your help.

Labels
Top Solution Authors