Calculated fields in DB views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2020 02:07 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2020 06:49 PM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader