Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to Show Months in Chronological Order (Jan–Dec) in Platform Analytics Report?

Vaishnavi B
Tera Contributor

Hi,

We’ve created a report in Platform Analytics with a condition:
"Created via Touchpoint" is True.

In the Date filter, when I select "Last 12 months", the report shows the months either in ascending or descending order, based on the sort options available — like alphabetically (e.g., April, August…) or by value.

Is there a way to display the months in proper chronological order, i.e., January to December, regardless of the data values?

Any suggestions or workarounds to achieve this would be appreciated.

VaishnaviB_0-1754295409793.png

VaishnaviB_1-1754295446729.png

 

Thanks!
Vaishnavi

2 REPLIES 2

Omkar Kumbhar
Mega Sage

Hello @Vaishnavi B ,

 

you can use a scripted breakdown or indictor to include a field like month Number (1-12) along side the month name then, sort the report by month number and display label as the month name.

(function transform(item) {
var monthNames = ['January', 'February', 'March', 'April', 'May', 'June',
'July', 'August', 'September', 'October', 'November', 'December'];
var monthIndex = item.getValue('sys_created_on').getMonth(); // 0-based index
return monthNames[monthIndex];
})(item);

 

OR

if you are using a breakdown for months you can create a breakdown source that includes months as static value

  • Add 12 entries manually:
    • January (Order: 1)
    • February (Order: 2)
    • ...
    • December (Order: 12)

 

and assign a sort order to each month and use this breakdown in your report

If I was able to help you with your case, please click the Thumb Icon and mark as Correct.

Hi @Omkar,
Thanks for your response! I actually meant Platform Analytics reports, not Performance Analytics — that was a typo on my part.
Do you know if showing months in chronological order (Jan to Dec) is possible in Platform Analytics?

Appreciate your help!