Hi Guys.
Youโve probably been asked a miilion times, but I canโt find the right way to resolve this.
Daily invoice totals grouped by MMMM,YYYY descending
In my app I have (not probably the right one) this expression in a VC called โMonth Orderโ:
CONCATENATE( INDEX( LIST(โJanโ, โFebโ, โMarโ, โAprโ, โMayโ, โJunโ, โJulโ, โAugโ, โSepโ, โOctโ, โNovโ, โDecโ ), MONTH([InvoicedDate]) ), " ", YEAR([InvoicedDate]) )
And in the view:
But the result in the app is:
I realise this is TEXT descending but I canโt find a way to have the results in the correct Date descending order. Can you guys assist please.
Kind Regards
As per my understanding, there is no very elegant solution for this requirement. One not so elegant workaround could be to have the year month digit numbers precede the month year description. If all the data is in the 21st century, the century part may be dropped from the year in the preceding sorting digits, thereby making the preceding sorting digits length of max 4 digits
The expression for the group by field can be something like
CONCATENATE("(", TEXT([InvoicedDate], โYYMโ), ") ", TEXT([InvoicedDate], โMMMM YYYYโ))
Hi Suvrutt, the following helps but doesnโt give me the Month as Text:
CONCATENATE(YEAR([InvoicedDate]),"-",IFS(MONTH([InvoicedDate])<10, โ0โ),MONTH([InvoicedDate]))
But this does work, ideally it would be good to see the month however we can live with this.
Oh okay. Thank you Dave for your updates. The general idea will be to add some properly sorting prefix to month year description as months otherwise sort alphabetically and not in their calendar order.
Yes, I agree that one needs to choose the best option that suits the app users.
User | Count |
---|---|
40 | |
34 | |
28 | |
23 | |
17 |