Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello, I have a calculated field that returns the name of the month.
I would like to enter this field in a table and sort by name month (in Italian).
I'm applying the function
dual ([Date planned delivery], if ([Date planned delivery] = 'Gennaio', - 1, num ([Date planned delivery])))
but it does not work.
I also applied to the expression:
= Match ([Date planned delivery], $ (= chr (39) & Replace (MonthNames, ';', chr (39) & ',' & chr (39)) & chr (39)))
but even this works correctly.
Does anyone have any idea what it should use?
Would you be able to share a sample?
If I use the expression the result is:

and its' wrong.
The correct result is:
Gennaio (January)
Marzo (March)
Aprile (April)
Maggio (May
Giugno (June)
Can you try this as your calculated dimension:
Date(Date#(Upper(MonthFieldName), 'MMMM'), 'MMMM')
or
Month(Date#(Upper(MonthFieldName), 'MMM'))
The result is not correct. If I use your formula the result is:

But I would that the order is:
gennaio (Jenuary)
marzo (March)
aprile (April)
maggio (May)
giugno (June)
luglio
agosto
settembre
ottobre
novembre
dicembre
Can you share your environmental variables from the script?
They would look something like this
SET ThousandSep='.';
SET DecimalSep=',';
SET MoneyThousandSep='.';
SET MoneyDecimalSep=',';
SET MoneyFormat='€ #.##0,00;-€ #.##0,00';
SET TimeFormat='hh:mm:ss';
SET DateFormat='DD/MM/YYYY';
SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';
SET MonthNames='gen;feb;mar;apr;mag;giu;lug;ago;set;ott;nov;dic';
SET DayNames='lun;mar;mer;gio;ven;sab;dom';
Add one more to the list:
SET LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';
But change the month names to your Month Names
gennaio (Jenuary)
marzo (March)
aprile (April)
maggio (May)
giugno (June)
luglio
agosto
settembre
ottobre
novembre
dicembre
Once this is done try this once again -> Date(Date#(MonthFieldName, 'MMMM'), 'MMMM')
You can use sort expression like below,
=Date(Date#(Left(FieldName,3),'MMM'),'MMM')
