Calculated fields in DB views

Sireesha13
Kilo Contributor

I have a requirement of creating a report so I have all the required tables added to the database view. That report needs to display "No.of days between start date and end date" field but none of the tables has this field, but I have "Start date" and "End date" fields. Is it possible to show a  calculated field ("No.of days between start date and end date") in report without creating that field in table ? Will metrics or timeline pages helps to show calculated field? If possible through metrics, how can we join metrics to db view?

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

If you are using database views then this is not possible because fields shown on database view come from the tables you join

Simple approach: create a field on that table and that is a calculated value as difference between end and start

Use that field in report on that table

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader