I need to calculate No of days the state of asset is in IN Stock?

manibabu
Kilo Contributor

 hi

I need to calculate No of days the state of asset is in IN Stock?

As an Asset Owner/Manager I need a list of assets in stock and the number of days it has been in stock.

I will know when this is complete when a list can be viewed of assets in stock and how many days.

4 REPLIES 4

Jay81
Tera Guru

Please try below steps

 

1)Create metrics definition on asset table

 

 
 
 
 
View - Opens reference record in current window
 
 
 
 

 

2) Insert and stay  "metrics events" business rule change table to  "Asset [alm_asset]"

3) Duration gets captured as below when state changes from "In stock" to any other state.

 

Go to
 

 

4) You can create report on "Metric_instance" table to get the records

 

5) If end date is empty, You can write script to get the duration by using start date and current date.

 

PS : Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.

 

 

JA12
Tera Contributor

Where do I go in ServiceNow to create a dashboard with that info? 

@Jay How to calculate existing data which was already instock  ?

 

This metric helps/calculate if we change anything currently 

terrichapman
Tera Contributor

This might be oversimplifying, but I do something similar to this using a Time Series report of the type Spline.

I used these settings. The users seem to find it useful as is for assets currently in stock and to see those first in and how long they've been idle since the state changed to In stock.  They can of course drill into the record lists under each data point.

If you are looking to determine how much aggregate time an asset has spent In stock over its full life and across state changes, this "shortcut" is not going to help with that 🙂

find_real_file.png