Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm having a problem to sort in a Multibox that uses an expression as selection field.
The Expression is:
=Year&'-'&Month
Though the Month field is shown as text (Jan, Feb, Mar...) and it the sort it's showing all scrambled:
Any idea how to fix it?
Thanks!
Under the Sort tab, sort according to Expression: Year*100+Month
Hi why can't use function MonthName(Field)
Under the Sort tab as an Expression?
It didn't work
Under the Sort tab, sort according to Expression: Year*100+Month
Hi,
Use Below Set Expression Under Sort By Expression. Keep order Ascending. Deselect all other sorting options.
=Match(FieldName, '2017-Jan','2017-Feb','2017-Mar','2017-Apr','2017-May','2017-Jun','2017-Jul','2017-Aug','2017-Sep','2017-Oct','2017-Nov','2017-Dec')
The best solution is not to sort on the expression at all. Rather create a MonthYear field during the load using Date#() and MonthName():
LOAD ....
Year,
Month,
MonthName(Date#(Year & Month, 'yyyyMMM')) as YearMonth,
...
Now use MonthYear in the list box and sort by numeric (date) value.
Try something like this in the sort by expression window.
=max({1<Sort={">=$(=max(CalenderDate))+1,-12)) <=$(=max(CalenderDate))"}>} CalenderDate)
This worked great! Thanks!!