There are two ways to display data about a particular month:
- as its number;
- as a string.
Display a month as its number
In this case, everything is quite simple. If a month is displayed by an ordinal number, the sorting by months is carried out using the Sort button in the right corner of a dashboard element. Ascending and descending sorting are available.Note
To display the dateTime data type as a month number, you should use the Month() function.
Display a month as a string
If a month is displayed as a string when using the Sort button, data will be sorted alphabetically.To sort months in calendar order, you should apply the monthIdent() function to. After applying the function, ascending and descending sorting will work in calendar order instead of alphabetical order, and the first month will be January.
If you want to sort months in calendar order, but you need to start the sorting of another month, you should apply the fiscalMonthIdent() function, in which a data column is specified as the first argument, and a month number as the second one, starting from which you should sort data.
Important to know
You can use monthIdent() and fiscalMonthIdent() functions for any elements of dashboards.
On our YouTube channel you will find a video that describes the process of sorting months in Stimulsoft report generator.
If you have any questions, please contact us.