Alteryx Designer Desktop Discussions

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

How to calculate a sum of data in column as and when it is added in row

ShaileshDevadiga
7 - Meteor

Hi,

For below I would like to run similar formula in Alteryx for Average Purchase Price and Average VVWAP
Formula says that average price should be sum of value divided by sum of quantity. So sum will keep on adding as and when we add qty and value on daily basis
For example on 20th March , it will be 100/10 = 10, then next day it will (100+200)/(10+20) so accordingly it will keep increasing like (100+200+400)/(10+20+30)
At same time I need to be careful that Sum of that column is also calculated at bottom of column

Attached Input and formula

3 REPLIES 3
PhilipMannering
16 - Nebula
16 - Nebula

Hi @ShaileshDevadiga 

 

Does this do what you need?

PhilipMannering_0-1649757221601.png

 

ShaileshDevadiga
7 - Meteor

Thanks Philip, spot on, that;s what I was looking for, I shall same Run Total to calculate Average VVWAP column

ShaileshDevadiga
7 - Meteor

@ Philip Mannering - Thanks RunTotal works for Average Purchase price, but for Average VWAP it has different formula i.e =iferror(average(vvwap column)
So currently vwap column shows 2 for each day so average should be 2.

Labels