# Similar to Sumif

**URL:** <https://the.fmsoup.org/t/similar-to-sumif/5184>\
**Category:** Floating Topics\
**Tags:** filemaker\
**Created:** [December 20, 2025, 2:26am UTC](https://the.fmsoup.org/t/similar-to-sumif/5184 "2025-12-20T02:26:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![faldo](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@faldo](https://the.fmsoup.org/u/faldo)\
**Post date:** [December 20, 2025, 2:26am UTC](https://the.fmsoup.org/t/similar-to-sumif/5184/1 "2025-12-20T02:26:31Z")

</div>

Im trying to make sumif type totals. I have a list of transactions each with a specifice name. Im trying to get totals of each with the same names. Not lists of them but just the name with the sum. Hope this is not too vague. Eg names are say. Electric, Gas, and so on and just have total of all say Gas without listing them all. Thank you

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [December 20, 2025, 3:41am UTC](https://the.fmsoup.org/t/similar-to-sumif/5184/2 "2025-12-20T03:41:17Z")

</div>

Hi Faldo,

Welcome to The Soup.

You could do this with a summary field and a subsummary layout part.

Summary fields will do count, total, average, Std Dev, etc.

Check out [Defining summary fields](https://help.claris.com/en/pro-help/content/summary-fields.html)

---

<div class="post-metadata">

**Author:** ![xochi](https://avatars.discourse-cdn.com/v4/letter/x/0ea827/32.png) [@xochi](https://the.fmsoup.org/u/xochi)\
**Post date:** [December 21, 2025, 3:16am UTC](https://the.fmsoup.org/t/similar-to-sumif/5184/3 "2025-12-21T03:16:36Z")

</div>

Another technique:

Make one field in the transaction table per category, where the value is blank if it’s not in the category, otherwise equal the to the transaction:

```auto
Transactions::cGasTransactions : calculated field : If(Transaction::name = "Gas"; Transaction:value; "")

```

Then in your main table, you can do calculations on this related field:

`Main::GasTransactionTotal = Sum( Transactions:: cGasTransactions); // gets the total value of all "Gas" transactions`

or

`Main::GasTransactionCount = Count( Transactions:: cGasTransactions); // gets the Number of "Gas" transactions`

---

<div class="post-metadata">

**Author:** ![mike275](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@mike275](https://the.fmsoup.org/u/mike275)\
**Post date:** [December 21, 2025, 2:10pm UTC](https://the.fmsoup.org/t/similar-to-sumif/5184/4 "2025-12-21T14:10:16Z")

</div>

> **[FileMaker Custom Function: ifsum ( string ; filed ; fieldsum )](https://www.briandunning.com/cf/2619)**
>
> compared to

---

<div class="post-metadata">

**Author:** ![faldo](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@faldo](https://the.fmsoup.org/u/faldo)\
**Post date:** [December 21, 2025, 3:47pm UTC](https://the.fmsoup.org/t/similar-to-sumif/5184/5 "2025-12-21T15:47:10Z")

</div>

Away on holiday will check when back but i think easiest method as all above me all the formulas

---

<div class="post-metadata">

**Author:** ![xochi](https://avatars.discourse-cdn.com/v4/letter/x/0ea827/32.png) [@xochi](https://the.fmsoup.org/u/xochi)\
**Post date:** [December 21, 2025, 3:58pm UTC](https://the.fmsoup.org/t/similar-to-sumif/5184/6 "2025-12-21T15:58:37Z")

</div>

Please note that the SumIf() custom function does not handle missing values properly. In this example, notice how the missing scores are causing the totals to be miscalculated:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/d/d8bd589f1f6e69695f4724ce8aff5b51dc9d824d.png)

---

<div class="post-metadata">

**Author:** ![xochi](https://avatars.discourse-cdn.com/v4/letter/x/0ea827/32.png) [@xochi](https://the.fmsoup.org/u/xochi)\
**Post date:** [December 22, 2025, 4:16pm UTC](https://the.fmsoup.org/t/similar-to-sumif/5184/7 "2025-12-22T16:16:11Z")

</div>

I made an improved SumIf() custom function which can handle either field references (Table::Field) or Lists(). [Custom Function than handles field reference OR List of values? - #4 by xochi](https://the.fmsoup.org/t/custom-function-than-handles-field-reference-or-list-of-values/5188/4)
