Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Line charts that trend by a date field per week do not properly display records for a group when week is split between two years - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • Line charts that trend by a date field per week do not properly display records for a group when week is split between two years
KB0621883

Line charts that trend by a date field per week do not properly display records for a group when week is split between two years


1167 Views Last updated : Mar 28, 2025 public Copy Permalink
KB Summary by Now Assist

Description

Line charts that trend by a date field per week do not properly display records for a group when week is split between two years.

The behavior can also be replicated using a GlideAggregate script.

Steps to Reproduce

  1. Create or import some Changes and Incidents with a sys_created_on date and time between 2016-12-26 23:59:59 and 2017-01-09 00:00:00.

  2. Create a Line Chart report with the following values:

    Type: Line Chart
    Table: Task
    Group: Task type
    Trend: Created per Week Enable Display grid
    Filter: Created after 2016-12-26 23:59:59 and Created before 2017-01-09 00:00:00

    For more information, see the documentation topic Line reports.

  3. Execute the report.

    Observe the differences between the chart and grid list.

Note that the behavior can also be replicated using a GlideAggregate script:

var ga = new GlideAggregate("task");
ga.addEncodedQuery("sys_created_on>javascript:gs.dateGenerate('2016-12-26','23:59:59')^sys_created_on<javascript:gs.dateGenerate('2017-01-09','00:00:00')");
ga.addTrend("sys_created_on","week");
ga.addAggregate("COUNT","sys_class_name");
ga.query();
gs.info("Task type"+"\t"+"Count") while(ga.next()) 
gs.info(ga.sys_class_name+"\t"+ga.getAggregate("COUNT","sys_class_name"))

Workaround

Upgrade to the fixed versions NP9 / OP4 / Paris and then:

1. Add the 'glide.db.aggregates.trend.use_iso_week' and set value to true.
2. Verify that the report is show correct results.

It is recommended to test /validate via a subprod instance prior to implementing in production.

Note that all trend per week reports will no more consider week buckets defined as 7 days intervals after each "start of week day" (that is configurable via sys property).

After configuring glide.db.aggregates.trend.use_iso_week to true, These reports will consider week bucket as defined by ISO standard.

Also the user will not be able to choose this by report as of now this is a system configuration.


Related Problem: PRB594423

Potentially Seen In

There is no data to report.

Fixed In

New York Patch 9
Orlando Patch 4
Paris

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.