How to Group Report Records based on TODAY or NOW function

G24
Kilo Sage

I want to build a report which groups records into the following 3 categories:

1) Tasks which are past their Due Date.  (Red)

2) Tasks which are within 2 Days of their Due Date.  (Yellow)

3) Tasks for which the due date is >= 2 days in the future.  (Green)

 

What is the best way to achieve this functionality on a single report?  (I'm new to report writing.)

We noticed that it's easy to FILTER a report based on "Today" / "Now"...

But we are having trouble Grouping records based on a concept of "Today" or "Now".

We tried using the "Configure function field" concept, but it doesn't seem to have an "Operation" or "Field" for "Today" / "Now".

 

Thanks!!

3 REPLIES 3

Dan O Connor
ServiceNow Employee
ServiceNow Employee

Hey Geoff,

 

This sounds like you would want to use datasets so you can have multiple datasets in a single report. It's a cool little feature that sometimes isn't obvious to see

 

DanOConnor_0-1664974117152.png

I won't do your full report, but when you save a report, you can then add a dataset onto it. You can either have it as a drilldown(where you can show another report when someone clicks into data on your primary report) or in this case, have multiple sets at once, in a single report view.

 

The relative option in condition builder is useful as you can select specific date fields on a table and appropriate time to them, like 2 days ago or 3 days from now etc. 

 

Community forum not working fully since the upgrade, but if you search our Product Documentation site there is good information on datasets in reports. 

G24
Kilo Sage

Thanks @Dan O Connor 

I'm not sure I followed all of that, but I will try and learn more about Data Sets...

Hi, 

 

Here is how to do it.

 

https://docs.servicenow.com/bundle/tokyo-now-intelligence/page/use/reporting/task/t_AddAnAdditionalD... 

 

A feature I use often in dashboard reports.

 

Report ranges could also be a feature you could have a look at.

 

- Jan