Alteryx Designer Desktop Discussions

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

Range of dates grouped by count of months

Swayam_Sarkar
5 - Atom

Hello,

I am working with a data set where the dates are in a range (start_date, end_date). From this date range I am trying to summarize the data for the count (number of occurrences) in each month. For example the data is in this format, with additional columns on the right (which need to be aggregated per month & year).

 

start_dateend_date
05-02-201501-06-2016
08-03-201508-03-2015
09-03-201513-03-2015



Based on this data, the output I am expecting is:

 

yearmonthoccurrences
2015Feb1
2015Mar3
2015Apr1
2015May1
2015Jun1
2015Jul1
2015Aug1
2015Sep1
2015Oct1
2015Nov1
2015Dec1
2016Jan1
2016Feb1
2016Mar1
2016Apr1
2016May1
2016Jun1

 

Any help in this regard would be highly appreciated.

Best,
Swayam Sarkar. 

3 REPLIES 3
DavidP
17 - Castor
17 - Castor

You can use generate rows to convert each date range to to year and month rows as below, but then it is not clear how you'll know how to split the quantities for a date range to each month.

 

DavidP_0-1591948695797.png

 

DavidP
17 - Castor
17 - Castor

Or can you simply add a Summarize?

 

DavidP_0-1591948914636.png

 

Swayam_Sarkar
5 - Atom

Hello David,

 

Thank you for your reply. The generate rows tool you suggested could work and provide the output I need. As for splitting the date quantities to month and year, I just need to check if there is a count for that month / year, so I once I have the long table for all generated rows, summarizing the output would give me what I need 🙂

Labels