Horizontal Bar report on table | can't sort by aggregated field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I'm trying to create a Horizontal Bar report on sn_vul_vulnerable_item table for example showing Top 10 Configuration Items with the lowest average Remediation Time (Average ofage_closed field, grouped by cmdb_ci).
Filters: State = Closed AND Configuration item is not empty
Problem: When I add a Sort Field on age_closed ascending, I get the warning: "Invalid order by field age_closed: You can only order by the Group By field and/or the Stacked field"
Tried both Classic UI and New UI but same result. Any workaround? Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday - last edited yesterday
Hi @Med99 ,
Review the 'Sort by' value and the 'Group by' value, and make sure they are matching, which will help you resolve the issue
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0852211
If this response was helpful, please consider marking it as Correct and Helpful. You may mark more than one reply as an accepted solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I wanna list the top 10 Configuration items with the least age closed. Can't do this with matching the Sort by' value and the 'Group by' value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @Med99
Issue
When running a report, the following error is displayed at the top of a report, just below the filters:
"WARNING: Invalid order by field "instance.number": You can only order by the "Group By" field and/or the "Stacked" field"
Cause
One cause of the issue is the 'Sort by' value which is not matching the 'Group by' value.
Resolution
Review the 'Sort by' value and the 'Group by' value and make sure they are matching.
It's important to note that the 'Sort by' option does not support dot-walked fields as documented in the following documentation page at step 7: Create a bar report: "Add sort cannot be applied to dot-walked fields."
