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

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
SOLVED

Count the frequency and output in every month

Asteroid

Hi all,

 

I have a dataset like this :

 

ActivityStart_dateEnd_dateTotal number of days
Running01/01/1701/01/171
Dancing03/01/1704/01/172
Squash20/04/1720/04/171
Running23/04/1725/04/173

 

and I want the output to be like this

 

ActivityAprilMayJuneJulyAugSeptOctDecJan
Running300000001
Dancing000000002
Squash100000000

 

So it'll count the total number of days and put it according to the months. It starts at April due to the financial year. 

Do you guys have ideas how to output it out like the table above?

 

Thanks!

Alteryx Certified Partner

Hey @fangyi189,

 

This workflow should give you the desired output:

Frequency.PNG

 

 

Asteroid

Hi, this has helped a lot. (:  May I enquire why you did both join and right join for the join tool?

Asteroid

Hi,

 

I have this error after I changed the format of the date. Do you mind seeing the error for me? Been trying to solve it for awhile.

 

 

Alteryx Certified Partner

 

Hey @fangyi189,

 

Weirdly I didn't get an error when I ran your workflow (but I expected one).

 

In my original version I had used DateTimeParse, to convert your date into a proper date..but with your dates as they are this is no longer needed. I have updated the formula to reflect this.

 

In answer to your other question, I union'd the R & J outputs of the join because I wanted to make sure that I had an entry for every month regardless of whether there was an activity value for that month.

Asteroid

This new formula helps (: thank you!

@LordNeilLord  What About if there is no end date? 

Labels