Pivoting node: sorting pivot numerical columns

While pivoting on finance data, a lot of use case will require pivot columns on extracted date fields like years as level one and months as level two.
The Pivoting node behaviour in this case will concatenate years and months but will sort in A-Z, and not by its numerical value, e.g. 2020_1, 2020_10, 2020_11, 2020_12, 2020_2, 2020_3 …
while expected sort to be: 2020_1, 2020_2, 2020_3, …
I wonder if this should be a feature request, or a bug fix.
Using a DateTime column will be sorted correctly, but the reason of actually using several levels of date fields is the expected behaviour to align lower levels even with missing data.
so in the example above if I have data on 2 months on one year, and other month on other year, number of pivot columns will be 6 columns, 3 for each year.
The way I’ve solved it, as suggested on other relevant questions and solved by qqilihq in Column sorting,
I needed to add some more steps:

Hi @david_abekasis and welcome to the forum.

Sorry for the annoyance here. We do have a few tickets open for addressing the issue - in particular the idea that the user should have the ability to choose between lexographic and alphanumeric sorting in particular nodes where it makes sense. I don’t have a timeframe for when that might be implemented, but I can make note of your request for the developers.

Apologies for the inconvenience, and thank you for the feedback!

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.