Generating statistics such as sum and average from Custom Fields
Asked by Ryan Swimm:

I have created JSM custom fields. Some of the custom fields include dollar amounts and other numeric amounts. I'm trying to generate a sum and average of a custom field for a set amount of tickets in a time frame. For example, I am trying to find the sum of a dollar amount for all tickets in January 2024. I tried leveraging reports, but that is not counting the value within the custom field.


Answers:
author: Marlene Kegel - codefortynine
body: Hello [@Ryan Swimm](/t5/user/viewprofilepage/user-id/1359617),

I am Marlene, product manager of [Quick Filters for Jira Dashboards.](https://marketplace.atlassian.com/apps/1220136?utm_source=atlassian&utm_medium=referral&utm_campaign=quickj-new-reach-ops-2630442)

With our app you can [sum up any Jira number field](https://documentation.codefortynine.com/quick-filters-for-jira-dashboards/aggregate-values-of-jira-number-fields?utm_source=atlassian&utm_medium=referral&utm_campaign=quickj-new-reach-ops-2630442), using our statistics gadget and the Quick Pie Chart gadget. It is also possible to display averages, minimum and maximum count (as you can see in the screenshot I attached below).

You can [check out our app without installation](https://codefortynine-demo.atlassian.net/jira/dashboards/10003?utm_source=atlassian&utm_medium=referral&utm_campaign=quickj-new-reach-ops-2630442) on our demo dashboards.

![quick-filters-jira-dashboard_custom-number-field-average.png](https://community.atlassian.com/t5/image/serverpage/image-id/311317i0F512FD48A1CC6F7/image-size/large?v=v2&px=999 "quick-filters-jira-dashboard_custom-number-field-average.png")


author: Danut M _StonikByte_
body: Hi [@Ryan Swimm](/t5/user/viewprofilepage/user-id/1359617),

as far as I know, this cannot be done with the Jira's native reports or gadgets.

Your best option here would be to use the **Issue Filter Formula gadget** and **Advanced Issue Filter Formula gadget** offered by our [Great Gadgets](https://marketplace.atlassian.com/search?query=great%20gadgets%20stonikbyte%20agile) plugin.

With these gadgets you can apply from simple (SUM, AVERAGE, COUNT, etc) to complex and combined math formulas against the numeric fields from multiple Jira filters.

Here are some examples.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/310437i7912E7B5509D69FF/image-size/large?v=v2&px=999 "image.png")

![](https://blogstonikbyte.files.wordpress.com/2022/01/image-6.png?w=693)

See also this article with more examples of these gadgets and how this app will help you to better track your projects in JSM: <https://community.atlassian.com/t5/App-Central/An-effective-dashboard-for-Service-Desk-and-Customer-Support/ba-p/2360369>

Hope this helps. For any questions, please don't hesitate to contact us at support@stonikbyte.com.

Danut


author: John Funk
body: Hi Ryan,

Where are you planning on using the sum? Is there some type of parent that you could place a custom field for "Total Dollar Amount"?

comments: author: Ryan Swimm
body: Hi John,

We have different custom fields such as dollar value, and number of questions in the request. We measure our ticket metrics by the month and by the quarter. There are no parent tickets that these roll up to. If we have 100 tickets in a month, and there are various dollar amounts in each ticket, I want to add the sum via the already existing custom field.

Ryan


author: John Funk
body: The "problem" with having total fields and no parent is where do you actually store that? So if you have 5 issues that have a field with dollar amounts in them and you want to see the total, then you need a field to store the value in. So that same field would need to be in all 5 issues. And as Automation fires and the field is updated, it shows the same value across all 5 issues.

But then when you are reporting that gets messy because you then have multiple issues over the timeframe.

I hope I am explaining that in a way that describes the issue. Personally for something like this, you are better off using an add-on like Rich Filters or Great Gadgets above that will do the math for you in the gadget and show you the results - including sums of columns. It's really the only "clean" way to do it.


Tags: cloud

jira-service-management

jira-service-management-cloud