Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Subtotal on field change

WVOz1970
5 - Atom

Is there a way to sum a group of items based on when a field changes to something specific and number of rows will vary. Sample data below... I'd like to be able to sum the "Data" numbers whenever the indicator "Flag" changes to "0".  So in the example, I'd subtotal 6+5 for 11, then just 6 for the next subtotal, then 7+6+8+1 for the next subtotal of 22 and so on. Whenever the indicator flag changes to "0", that signifies the next group for subtotaling. The number of rows to subtotal can vary, so it's not something that the Sample tool can account for.

 

Thanks for any input!

 

DataFlag
60
51
60
70
61
82
13
50
61
42
52
60
1 REPLY 1
FinnCharlton
13 - Pulsar

Hi @WVOz1970 , here's how to do this:

FinnCharlton_0-1680706008226.png

Hope this helps!

Labels
Top Solution Authors