3 Replies Latest reply: Oct 17, 2014 11:16 AM by Dan Magnus RSS

    How to sort months across a year change?

      I am creating a table that has sum(Sales) for the last 12 months by using this formula: 


      Sum(if(CloseDate <= Floor(vLoadDate) AND CloseDate > (Floor(AddMonths(vLoadDate,-12)) - Floor(Day(vLoadDate))+1), Sales))



      I want to use just the first letter of each month.  My question comes with sorting.  As of today, a normal sort would show Nov & Dec (Sales Month) of LAST year after the current month of October...when I want to show Nov & Dec of last year BEFORE January of this year.  What is the best way to sort this dimension (Sales Month)?  Being that this is a rolling-12 month chart, I would want all of last year’s month sorted before this year’s month.


      Any thoughts?  Thanks!