community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Un-binning? dates/period to days per month

Hi everyone!


I would greatly appreciate some help with transforming some data.

My goal is to take take two dates (a period), and dump their respective number of days into individual month buckets.

 

I would like to transform the following:

Client NumberPeriod StartPeriod EndTotal Days
11111Jan-01-2018Mar-15-201874
22222Jul-02-2018Sep-08-201869

 

Into this:

Client NumberPeriod StartPeriod EndTotal DaysJanuaryFebruaryMarchAprilMayJune JulyAugustSeptemberOctoberNovemberDecember
11111Jan-01-2018Mar-15-201874312815000000000
22222Jul-02-2018Sep-08-20186900000030318000

 

 

How might I go about doing this? Apologies if this has been addressed elsewhere. Please refer me to the question if that is the case.

Thanks!
//Sam

Alteryx Certified Partner
Alteryx Certified Partner

Use the Generate Rows tool to create a list of all the days, format those dates as months, then count the results in a Cross Tab tool. Check out the attached example solution to see this in action. 

 

Edit; I added a few more tools to show how to make sure all months are output and in the correct order. 

Asteroid

Here's one way you can do it with the "Generate Rows" tool.

Capture.JPG

Labels