Reporting on metrics with database views

jcmings
Mega Sage

I am trying to run a report on the Duration cases are assigned to different Assignment Groups. I am using the OOTB metric Assignment Group Duration for HR Case

 

However, I want to filter on specific columns on my HR Case table, so I created a database view that links HR Case, Metric, and Metric Instance. In my report, I'm pulling off of the Database View for my table, grouping by Assignment group, and aggregating based on the average Duration

 

I also want to run a report on the Duration cases are in each Request Status. Do I need to create another metric? Or can I just run the report on the same database view and change the filter/group by? I'm a little confused on the purpose of creating metrics now that I can just modify the filter/group by being run on the database view for the report.

 

 

 

5 REPLIES 5

AndersBGS
Tera Patron
Tera Patron

Hi @jcmings ,

 

you need to create another metric definition, as metrics will capture by definition. Hence, if you will capture by status change and do not have a metric odor that purpose, then you should create one.

 

if my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

Best regards

Anders

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/

I don't understand--I don't filter by Definition on the report. The report allows me to group by and filter by Request Status, so what's the point in creating a metric?

Hi @jcmings ,


please find the documentation in relation to metric definitions: https://docs.servicenow.com/en-US/bundle/utah-platform-administration/page/administer/time/reference...


But please share which table you’re doing the report on, and which filtration your using, so that I can verify the solution that I have provided.

 

my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

Best regards
Anders

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/

Here is that information:

  • I am running the report on the custom database view table (which joins sn_hr_core_case, metric_definition, and metric_instance)
  • My filter: Assignment Group.Parent = (parent name)
  • Group by: Assignment Group
  • Aggregation: Average Duration (metric_definition duration)

 

Do I also need to add Definition=(Metric) into my filter? I am mainly confused because I am able to see the duration without having the Definition in my filter... but it is possible I am seeing the wrong data.