This forum is now out of date, for our new forum Click Here
How to sort filter with a special order dynamically
Question Asked
Hi supporter,

I want to sort a period month like below:




I use org ref code to sort the period month manually.
every month i have to add one more month to org ref code and reordered.
if i put whole year data in org ref code, then the filter will show the whole year period month.

But the user won't see so many data, they want to see the data which have be loaded into Database level.
if we only have data from Jan-2012 to Oct-2012 then the filter only show data from Jan-2012 to Oct-2012 with month desc,

so how to dynamically generate the month from Database and sort the month as desc like the imgae above?


Thanks & Regards,
Ya Qing

guest

Thu Jan 3, 2013 3:43 PM

Comment
Hi Ya Qing,

My personal preference for handling this sort of situation is to use the Year and Month fields (from "Calculated Fields->Date Hierarchy") in Step 2 of the View Builder, set them to whatever your timestamp field is, and then create an Org Ref Code set called Months for the 12 months and use that to Format the field:









This way you won't have to add a new code for every new month, just use the same 12 Org Ref Codes for every new year:





I hope this solution will help your report, please let us know how it goes, and if there are any other questions don't hesitate to contact us.

Regards,
Dave

David

Thu Jan 3, 2013 5:21 PM