Free Trial

Alteryx Designer Desktop Discussions

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

Add mm/yyyy columns between date range and split $ amount evenly across all months

sberhalter
5 - Atom

First post in this forum, I will try my best. 

 

I have a file that contains all government grant data for the year 2021. 5.5 million rows and around 300 columns. Three of the columns are important to me: period_of_performance_potential_start_date, period_of_performance_potential_end_date and sum_potential_total_value_of_award. 

The start and end dates vary by contract and what i would like to do it to add columns for every month between the earliest date in the start date column and the latest date in the end date column. Then, for each contract, split the sum_potential_total_value evenly across the appropriate months in the date range for that contract.

 

How it is now           
   period_of_performance_potential_start_dateperiod_of_performance_potential_start_datesum_potential_total_value_of_award       
 Contract Row 13/1/202112/1/2021250,000,000       
 Contract Row 26/1/202111/1/2021100,000,000       
             
What I want           
   3/1/20214/1/20215/1/20216/1/20217/1/20218/1/20219/1/202110/1/202111/1/202112/1/2021
 Contract row 1                         25,000,000                         25,000,000                         25,000,000         25,000,000         25,000,000         25,000,000         25,000,000         25,000,000         25,000,000         25,000,000
 Contract row 2            16,666,667         16,666,667         16,666,667         16,666,667         16,666,667         16,666,667 

 

Thank you everyone!

4 REPLIES 4
Sebastiaandb
12 - Quasar

Hi @sberhalter ,

 

I must be blind but i can't find either period_of_performance_potential_start_date  AND  sum_potential_total_value_of_award in the attached dataset?

 

Greetings,

 

Seb

sberhalter
5 - Atom

My apologies: 

 

potential_total_value_of_award

period_of_performance_potential_end_date

period_of_performance_start_date

 

Qiu
21 - Polaris
21 - Polaris

@sberhalter 
There are a lots of columns, if I am doing it correlty. 😂

1203-sberhalter.PNG

sberhalter
5 - Atom

Wow! Thank you 🙂 

 

This works perfectly on the sample set but on the full set I run into issues with the cross-tab node and it adds a bunch of months that aren't actually contained in the start/end date columns. I have attached the full file so you can see what I mean. 

Labels
Top Solution Authors