Free Trial

Alteryx Designer Desktop Discussions

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

Help with getting discreet twelve month period totals

csh8428
11 - Bolide

I know how to get a rolling total from data, but this is different. I have a dataset where I need to see each rolling total of [HOURS] for all the preceding 12 month periods for a unique [KEY_c]

For example, what is the total hours from Jan2024 - Dec2024, Feb2024 - Jan2025, Mar2024 - Feb2025, etc... The dataset only contains data from any given 2 years, so there are only 12 sets of rolling periods.

 

I've attached a spreadsheet with sample data and results, but there is also a screenshot of the results I'm trying to achieve. 

 

screenshot.png

2 REPLIES 2
acotta17
7 - Meteor

Hi chs8428,

 

You can follow the steps given below to get your desired output. 

 

1. Use the Tile Tool by selecting Unique Values and choosing the group by option with the first two columns 

 

2. Add a Multi Row formula Tool with create new field option and Num Rows set to 12. 

 

3. Add the below formula to the tool: [Row-1:Value] + [Row-2:Value] + [Row-3:Value] + [Row-4:Value] + [Row-5:Value] + [Row-6:Value] + [Row-7:Value] + [Row-8:Value] + [Row-9:Value] + [Row-10:Value] + [Row-11:Value] + [Value]

 

4. Use the filter tool to select columns with Tile_Num>=12 

 

[Workflow attached below]

 

Hope this helps :)

 

Screenshot_2024-10-01-00-31-21-83_40deb401b9ffe8e1df2f1cc5ba480b12.jpg

binuacs
21 - Polaris

@csh8428 a batch macro approach

image.png

Labels
Top Solution Authors