How to sort by month?

Hi all

Ive created a new column MMMM which transforms the date 01/01/2021 into month of the year by using the text MMMM

Ive then added another step to try and sort the Months so it displays Jan, Feb, March etc

However the only options are to sort ASC or DESC which results in an alphabetical sort which isnt what I want.

How do I solve this?

IS this a known bug?

Hi @Tmac :wave:

Good question!

I recommend using a “Sort rows” step before formatting your data into MMMM. That should sort your data by targeting the numeric month value.

Once sorted into ASC, you can then format your dates as MMMM to represent January, February, March, etc.

Let me know if that helps. :slight_smile:

The first step worked. Sorting the actual dates made them display in date order.

However when adding in the transform ‘Count by Group’ it still doesn’t display in order as Jan, Feb March etc.

Instead it displays in alphabetical order April, August etc

Please can you try this out as it really doesn’t work

Hi @Tmac,

Thanks for clarifying! In that case, try using an “Insert If/else” step after your “Count by group” step to add a sorting rank to each month. Here’s an example outlining how to set this up:

Feel free to copy and paste the snippet into your flow for a pre-configured “Insert if/else” step along with your desired sorting.

parabola:cb:14c82c0c4ad6489abd9f5c6332449303

Just be sure to plug in your initial count by group step into the first step of the snippet.

thanks my issue has been fixed.

thanks for the awesome information.