Start Free Trial

Alteryx Designer Desktop Discussions

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

Need help splitting data with start/end dates into monthly columns

AnjaBabble
5 - Atom

I have a data set which is set out like the following: 

Service ChargeStart DateEnd Date
A£3001/06/202531/08/2025
B£4.5025/05/202524/06/2025
C£1014/05/202513/06/2025
D£9.5001/06/202530/06/2025

 

I want to change the data so rather than having start/end dates, each month is a column with the relevant charge for that period showing in the column. How can I do this? 

4 REPLIES 4
mceleavey
17 - Castor
17 - Castor

Hi @AnjaBabble ,

 

are you saying you want the dates converted to just months? Can you provide a mock up of what you would like to see?

 

M.



Bulien

AnjaBabble
5 - Atom

Hi M, 

 

Id like to be able to split the charge over the relevant months. So it would look something like this:

Service ChargeStart DateEnd DateMay-25Jun-25Jul-25Aug-25
A£3001/06/202531/08/2025 £10£10£10
B£4.5025/05/202524/06/2025£0.90£3.60  
C£1014/05/202513/06/2025£5.67£4.33  
D£9.5001/06/202530/06/2025 £9.5  
mceleavey
17 - Castor
17 - Castor

Hi @AnjaBabble ,

 

I first converted the date fields so I could do datetime calculations, this is so I could get the Generate Rows tool to create the values for each month in between the Start and End dates.

I then simply counted the instances and joined that back to the stream by each Case. Then it was a simple case of converting the charge to a numeric value and dividing it by the count. Then I cross-tabbed it to the required format:

workflow.jpgresults.jpg

Workflow attached.

I hope this helps,

 

M.



Bulien

atcodedog05
22 - Nova
22 - Nova

Hi @AnjaBabble ,

 

Here is my take on it.

 

Charge Months.png

 

Cheers and Happy Analyzing :)

Labels
Top Solution Authors