Can I create calculated fields on a Report?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2013 02:28 PM
I am trying to write a report where I return rows with number data fields. It doesn't matter from which table I'm getting the data, as this is a more general question.
In any case, I would like to know if it's possible to do any of the following.
1. calculate a field in the report: I get two number fields from a table and would like to, say, add the columns to display in a new column.
2. Create a new column and populate that column based on data in another column: e.g. If Column1 = blue then CalculatedColumn =12 else CalculatedColumn =6)
3. Count distinct: Retrieve a number of rows that would include data from a report accessing Tasks, Request Items and Requests, then find how many distinct Request Items there are (for instance, let's say I have 20 tasks for 16 RequestItems which were part of 10 Requests...then I'd like to see a distinct count of 10 Requests.
It seems like it would have to be possible, but if none of these is possible in a standard report, is there another approach to find this data? Please keep in mind that I'm just getting started in this and if you give me code, I won't have any idea where I would write or call the code.
Thanks,
Eric
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2013 11:20 AM
You will likely need to use the Custom Chart plugin to create this type of report that includes counts of distinct, etc. You could use a Pivot Table report, but I am guessing that is not what you are looking for.
http://wiki.servicenow.com/index.php?title=Custom_Chart_Data_Generation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2013 12:13 PM
Hello,
I guess it is not possible with normal ServiceNow Reportings. You could calculate this field on the table itself or in an additional table and create a database view.
But it would be great if I am wrong and there is a possibility. Because I needed something like this a couple of time already.
Kind regards
Konstantin
Cheers,
Kostya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2013 12:27 PM
I needed a similar thing today as well. In my case I just created a calculated field on the table itself, and included it in a database view I am reporting off of.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2013 12:38 PM
Yeah, the reporting application is quite simple and not flexible enough. Maybe it is worth for a enhancement request. I guess the new Performance Analytics (former mirror42) can do such thing, but it is too expensive 🙂
Cheers,
Kostya