Calling all Alteryx customers: Refer your colleague to try Alteryx and receive a $50 gift card. Sign up now!
Free Trial

Alteryx Designer Desktop Discussions

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

How to define rolling 12 months period?

csh8428
11 - Bolide

I have a data-set that looks like this

KEY_cEFF_DT
2269_1_15/1/2025
2269_1_14/2/2025
2269_1_19/2/2024
2269_1_18/31/2024
2269_1_13/25/2024
2269_1_13/23/2024
2269_1_13/21/2024
  
5523_1_15/28/2025
5523_1_14/29/2025
5523_1_19/29/2024
5523_1_19/27/2024
5523_1_14/21/2024
5523_1_14/19/2024
5523_1_14/17/2024

 

How would I go about adding a "ROLLING_TWELVE_MONTH_PERIOD"(365 das) where the calc starts at the MIN EFF_DT for each KEY_c so the results look like this

KEY_cEFF_DTTwelve Month Period
2269_1_15/1/20252
2269_1_14/2/20252
2269_1_19/2/20241
2269_1_18/31/20241
2269_1_13/25/20241
2269_1_13/23/20241
2269_1_13/21/20241
   
5523_1_15/28/20252
5523_1_14/29/20252
5523_1_19/29/20241
5523_1_19/27/20241
5523_1_14/21/20241
5523_1_14/19/20241
5523_1_14/17/20241
1 REPLY 1
SPetrie
13 - Pulsar

Here is one method. You need to get your dates into an actual date format in order to get a time difference. Then You grab the minimum date per key and use it to compare.

I used the ceiling of the difference in days divided by 365 to get the 1 or 2 values and a formula to clean up the 0 values for same dates.

rolling.PNG

Labels
Top Solution Authors