Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I want to display last 12 months data in bar chart, but the sorting order should be like this:
Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec,Jan,Feb,Mar
So the data is showing between Apr-2019 to Mar-2020
Current month will always be last.
Suppose when April-2020 will come , then the sorting order will be like this:
May,Jun,Jul,Aug,Sep,Oct,Nov,Dec,Jan,Feb,Mar,Apr
One crude expression you can try for sorting like:
=If(
Month(Date#(Month, 'MMM'))-Month(Today())
<1, Month(Date#(Month, 'MMM'))-Month(Today())+12,
Month(Date#(Month, 'MMM'))-Month(Today()))
Or if your month is a proper dual field, i.e. - number at the back, you can replace "Month(Date#(Month, 'MMM'))" with just 'Month' field
One crude expression you can try for sorting like:
=If(
Month(Date#(Month, 'MMM'))-Month(Today())
<1, Month(Date#(Month, 'MMM'))-Month(Today())+12,
Month(Date#(Month, 'MMM'))-Month(Today()))
Or if your month is a proper dual field, i.e. - number at the back, you can replace "Month(Date#(Month, 'MMM'))" with just 'Month' field
Hi @tresesco
I replaced my month field here: Month(Date#(Month, 'MMM')) and it worked perfectly.
Thanks a lot. 😀