Show group by records with more than 1 record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2025 11:48 PM
Hello! I am trying to pull a report for "repeat offenders" in the last 48 hours for the Service Desk. I was hoping to just run a report on the incident table and group by customer but only want to see grouped values that have more than one record. For example in the screen shot below, the highlighted rows are the data I would like to see. I would like to filter out any other grouped row that only has one value but I am not sure how to do so. Any help is appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 12:19 AM
Go to Reports > Create New
- Navigate to Reports and click Create a Report.
Select the Incident Table
- Choose the Incident table as your data source.
Choose Report Type
- Select List Report (this allows you to see detailed records).
Apply Filters (Conditions):
- Opened on Last 48 hours.
- (Optional) State is not Resolved or Closed.
- (Optional) Assignment Group is Service Desk (if relevant).
Group by Customer (Caller):
- Find the "Group by" field in the report settings.
- Set it to Caller (or Opened by, depending on your setup).
Add a Condition to Show Only Repeat Offenders:
Since the built-in report UI doesn’t allow filtering by grouped values directly, we use a trick:- Switch the "List Report" to a "Bar Chart" temporarily.
- Once in Bar Chart, add:
- Group by: Caller
- Aggregation: Count(sys_id)
- You will now see a visualization with incident counts per caller.
Filter for Only Customers with More than One Incident:
- Look for an option like "Show Records With" or "Having Clause" (varies by ServiceNow version).
- Set it to Count(sys_id) > 1.
Switch Back to List Report (If Needed):
- If you want a table-style report, go back and switch the visualization from Bar Chart to List Report.
Run and Save the Report
- Click Run to verify.
- If everything looks correct, click Save for future use.
✔️ If this solves your issue, please mark it as Correct.
✔️ If you found it helpful, please mark it as Helpful.
—
Shubham Jain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 12:42 AM
Not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 02:13 AM
Hi @vipinmann20 ,
Create a Script include with GlideAggregate such like this with sandbox enabled as true and write you logic there
using groupBy and Having methods.
use this script include the report filter condition
Before
After
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 09:33 AM
I too need a report of this type and have been unable to "filter" as mentioned. When I am in list view, I don't see the options to filter the count if more than one entry. Can someone please provide detailed instructions. I am on Yokohama and new UI.
I want a report that shows duplicate client records.
Thank you.