Sum All Rows of Data Into 1 Row In Notion

I’ve tried what seems like everything.

Every night, I want to grab all the rows data from database A and then sum the fields into database B as 1 row.

So in database A, I might have 200 rows of data. Let’s say one column has 5 for every row. 200 rows x 5 = 1000. And that’s exactly what it should say. But for each property.

If I can figure this out… I’ll be ECSTATIC.

Try this:

  1. Search Objects (Database A, no output limit, no filter)

  2. Array Aggregator (aggregate module 1, select all)

  3. Set multiple variables (see screenshot 1 - change “Value1”/”Value2” in the map functions based on your actual property names)

  4. Update/create database item–depending on your specific need (database B, map the sum from the variables module)

2 Likes

This works 100%. THANK YOU!

I did figure out another way, and that was creating multiple variables with a router, then having 1 Get Multiple Variables before the Create Database Item. As you can see from the screenshot, it works, but it would get real messy real fast.

With this method, I was able to actually figure out more of how to get the data I want. With your method here, how can I also count the amount of times a property contains or is equal to text? For example I have a “Payment Package” property with “Paid In Full” and “Month to Month” as the options.

Is it possible to use your same setup (simple and clean) to also count exact matches of text, checkboxes, names, dates, etc?

This works absolutely perfect for what I need so thank you SO much for helping me out.

1 Like

You can likely use the map() function (including the filter parameter), contains(), and length() to achieve the count of Text

Array functions documentation here

1 Like

This has also been very helpful so thank you again. I’m having trouble getting this to recognize the actual name of the options to choose from. In my first database I have 4 rows, and no matter what, it always returns 4. Yet, only 2 of these rows contain the correct text I’m trying to count the total of. I’ve gotten 4 or 0, never the correct number.

Any tips?

Also using Claude/Grok/ChatGPT and they haven’t given me any working solutions either. Tried maybe 5-6 different ways. Having a hard time getting this lol. Started using Make about a week ago.

1 Like