Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Sum of Previous 12 months sales

Sunitha
8 - Asteroid

Hi All,

 

Please help me to calculate sum of previous 12 months sales for each month. each row for every month should have sum of past 12 months sale.

 

'sum of PTD Movement' is coulmn where i need to calculated sum

 

Sunitha_0-1594385171068.png

Sunitha_0-1594387881201.png

 

 

Data set has below mentioned columns

 

Sunitha_1-1594385284620.png

Currently i'm using alteryx version 2018.3 Please suggest feasible solution.

 

Thanks,

Sunitha 

 

7 REPLIES 7
andyuttley
11 - Bolide
11 - Bolide

Hi @Sunitha 

 

You should be able to use a summarise tool:

- Group by Period, and

- SUM the PTD Movement field

 

Hope that helps

 

Andy 

NicholasM
Alteryx Alumni (Retired)

Hey @Sunitha 

 

To echo what @andyuttley said, The Summarize tool will do the trick. I have built out a brief example for you. Feel free to pick around and tweak where necessary. 

 

To get the Grand Total you will need to use another Summarize Tool. 

 

Hope this helps!

Sunitha
8 - Asteroid

Hi  Nicholas,

 

let me rephrase  sorry for confusion. each row for every month should have sum of past 12 months sale.

 

Sunitha_0-1594387786910.png

 

 

 
 

 

NicholasM
Alteryx Alumni (Retired)

Hi @Sunitha 

 

Ahh in that case you will follow up the Summarize with a Multi-Row Formula Tool. This will allow you to sum up the previous rows data. See attached workflow for an example. 

Sunitha
8 - Asteroid

Thank you Nicholas for solution.

 

i tried same approach and adding additional column which i would require for reporting i'm not getting same result. Am i missing out anything. Please suggest.

NicholasM
Alteryx Alumni (Retired)

Hey @Sunitha,

 

I recommend not adding the columns back in the summarize tool, being that this will no longer get you Sum Sales by period. You will now have multiple rows for each period. I would instead do something like the photo below. Pull back the information that you need by using a Find Replace or Join after the calculations have been made.

 

Hope this helps, if so please mark this answer a solution. 

 

Capture.PNG

Sunitha
8 - Asteroid

Thank you Nicholas.

 

is it possible to achieve something like this, so that i can consider all columns before summarize .

 

 

Sunitha_0-1594392071081.png

 

Labels