Can you generate a sum of numeric custom fields on all cards on the list?
Asked by Rachel Beach:

I am new to Trello. I added some numeric custom fields to cards. Is there a way to display on a list the sum of values for each of the cards on that list?

++**Example:**++

I have a numeric custom field called Count

I have a List called "*M\&M's in a bowl*" with three cards:

* Name = Red, Count = 4
* Name = Yellow, Count = 1
* Name = Brown, Count = 5

**Can I show a total of 10 for the "M\&M's in a bowl" list?**


Answers:
author: Vongsawat
body: The [Number Stat](https://trello.com/power-ups/5b1fc66d100ffab6fecee00d/number-stats) powerup might be worth a look.  

Requires Gold or up though, as it also requires the base Custom Field powerup.


author: Iain Dooley
body: [@Rachel Beach](/t5/user/viewprofilepage/user-id/3746314) this Trellinator function sums the "Num" field in each list and adds that number to the list name. If the list name already has a number, it updates it:

<https://gist.github.com/iaindooley/2464ce050244fcb21565cd839d2e6201>

You can try this out here:

<https://app.benkobot.com/>

Once you authenticate you can copy/paste the code in to run it, you'll need to update the name of the board from "TEST" to whatever your actual board name is.

You could use a similar function executed daily or when cards are moved. You can see more about how to set up Trellinator here:

<https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Introducing-Trellinator-Automate-Trello-with-Google-Apps-Script/ba-p/925271>

Unfortunately BenkoBot doesn't do notification handling or scheduled commands yet.


author: milynnus
body: [@Rachel Beach](/t5/user/viewprofilepage/user-id/3746314) The count field would be a custom field. <https://help.trello.com/article/1161-custom-field-arithmetic>  
The challenge you will face will be iterate through the list and be able to store the results each step of the way. You can use either a label, description field, ..etc.  
I have a dashboard application which looks at any numeric custom field on a board or list and gives you count, sum, average, Min and Max in a table. I have plans to convert for use as an generic add on to Butler. Unfortunately I am exceeded my quota to show you a demo. Note also getting custom field via a Lookup command will probably be a challenge. Using Find move the current card point such that storing the sub totals will be a challenge. My will have to be on {triggercarddescription}

Consider using Smartfields Power Up.

**Update:** Completed and tested but because I exceeded my Butler I ran it on a Team board...you have the imagine the output you see below as being available to your Butler commands e.g if you need the average it will be {httpresponse.average}. There are probably other ways to do this but my objective is to do work in which native Trello cannot do and be able to integrate with Butler it is available to all users.

![Screen Shot 2020-08-04 at 12.46.43 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/105390i1EC74C4ED78C5511/image-size/large?v=v2&px=999 "Screen Shot 2020-08-04 at 12.46.43 PM.png")


author: Rachel Beach
body: Thank you all for your suggestions!