Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I created a variable with drop down list to list out date in YYYY-MMM format
expression:=(Concat(distinct [SALES_DATE.autoCalendar.YearMonth],'|'))
I would like to change the ordering in the drop down list to be order by date instead of by alphabetical order
Try putting sort weight in concat(), like:
=Concat(distinct [SALES_DATE.autoCalendar.YearMonth],'|', [SALES_DATE.autoCalendar.YearMonth])
Or
=Concat(distinct [SALES_DATE.autoCalendar.YearMonth],'|', Date#([SALES_DATE.autoCalendar.YearMonth]), 'YYYY-MMM')
Try putting sort weight in concat(), like:
=Concat(distinct [SALES_DATE.autoCalendar.YearMonth],'|', [SALES_DATE.autoCalendar.YearMonth])
Or
=Concat(distinct [SALES_DATE.autoCalendar.YearMonth],'|', Date#([SALES_DATE.autoCalendar.YearMonth]), 'YYYY-MMM')
Thanks. it works.
But I dont understand why we need to concat [SALES_DATE.autoCalendar.YearMonth] with [SALES_DATE.autoCalendar.YearMonth] itself rather than just one [SALES_DATE.autoCalendar.YearMonth]
It is not concatenating to itself, but the third parameter of concat() is for telling in which order the values should be concatenated, i.e. - as I already mentioned - it's sort-weight.
Is there a way to do the reverse of the sort? Such that the latest month comes first