metrics instance table is not showing exact data

MaharshiC
Tera Contributor

Hi,

 

We have two fields in my scoped app -- assigned to , substate. Now I want to check when substate - open then how much time the ticket is assigned to a particular user. For this i am using the metric_instance table but  in that table when i am selecting the field as assigned to then duration is showing only when assigned to is changing in the open substate state but not showing any value when the assigned to was added for the first time. Is there a way to get the entire duration of when the ticket was assigned to for the first time till it was changed in the open substate.

1 ACCEPTED SOLUTION

Hi @MaharshiC 

 

You can add the response SLA, which starts as soon incident is create and then you can use that value in the metric but moving these values are manual task.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

7 REPLIES 7

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @MaharshiC 

 

You need to create a metric on the state field. You can take reference from the OOTB metric in the incident state.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hi @Dr Atul G- LNG ,

Thanks for your reply.  My table is extended from the task table. Will creating a new metrics be a change in the metric_instance table itself.  I will not have access to directly make changes in the global tables.

 

Regards,

Maharshi Chatterjee

Hi @MaharshiC 

You need to create metric on your table only on the state field. I was saying if you have doubt then check the OOTB metric on Incident table.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hi @Dr Atul G- LNG ,

 

I have created the metrics in my custom table but the issue is its working as expected if we are changing the assigned to field from one assigned to user to another but it is not showing value when the ticket is assigned from the first time( for eg - initially assigned to was empty and it was assigned to user A and then after some time it was assigned to user B. Ideally there should be duration for both the situations but I am getting duration for the second case only(for user B) and for the first case(for user A) no duration value is showing. I am not using any script

 

Regards,

Maharshi Chatterjee