Sum Values for each Row Using Rollup

As a point of reference, I have read the discussion in the below link before writing this.

I am trying to get the sum associated with a Relation using Rollup. As you can see from the attached, my Lookup shows the values that I am trying to add for each row. When I do a Rollup based on the relation used for the Lookup, however, I run into two problems:

  1. Only “Count” and “Count Value” show up as options. I, however, need “Sum”
  2. Even if I were to select “Count” the options to Save remains grayed out

I would appreciate any thoughts any of you might have in order to address.

1 Like

Hey @Fassil_Befekadu

Actually, the Sum function will only works with a single value. I mean, instead of the Relation be checked the Match multiple, be unselected as a single Relation.

The lookup value will shows you only that one and with a Rollup column you’ll can sum.

I know it would be perfect if we can Sum values of a multiple relation. But in glide we still can’t do this.

Knowing that, you’ll have to create some more columns but will help you a lot.

My suggestion is create a Relations from each item you gotta do the Lookup. Each one as single Relation! Before you create the Rollup column, create a Math column, sum all the Lookups, and finally, create the Rollup just summing the values from Math column.

This should be a request :frowning_face:

Knowing this, wouldn’t this be better if we do this in the Sheets if he can accept a little bit of lagging?

2 Likes

Yeah man! :frowning:

Let’s see what he prefers, but I don’t like lagging, that’s why I use Data for everything :joy: :turtle:

1 Like

Yeah sometimes we just have to create a lot of columns. My personal record was the booking app, I created like 60 columns to achieve what I wanted :laughing:

1 Like

60 for a booking app? :thinking: damn, I have some models and I didn’t use this amount.

But I’ve already had to create like 60 columns to achieve what i wanted :sweat_smile:
Forgetting the rest of the app lol

3 Likes

@ThinhDinh the post of reference @Fassil_Befekadu left above is from @Robert_Petitto, and it’s already requested
Hope we get it!

1 Like

First of all, you can do a rollup sum on a multiple relation. That’s the whole point of it. The problem here is that the column that needs to be summed is not a numeric column. Glide is only seeing it as a text column. I don’t know how you are building the column being summed, but you need to make sure it is seen as numeric.

Your second issue with the Save is possibly due to you renaming the relation after you created it. I’ve seen this a few times and it’s best to just delete the relation and recreate it with the correct name from the beginning.

5 Likes

@Jeff_Hager, @Lucas_Pires, and @ThinhDinh - thank you all for your feedback. But I am left a little confused by the above discussion.

  1. @Jeff_Hager - what do you mean “renaming the relation after you created it”? I am doing a Rollup on a Relation that I previously created (“Rel w Bills - Payment Arrangement” in my screenshot). I have made no attempt to recreate the Relation itself so I am not doing any renaming. Can you please explain? Keep in mind I have been unable to save my Rollup - so I do not have that as part of my saved information either.

  2. @Jeff_Hager I have made sure that the numbers shown in the column I am trying to roll up are formatted as numerical values (and not text) in my google sheet and it has made no difference. Is there another specific process I should follow?

  3. @Jeff_Hager - are you saying that what I am trying to do (ie. get the sum for the values in each row) is possible with my approach and that @ThinhDinhs and @Lucas’_Pires approach is wrong? That they did not have to “create 60 columns” to do what they needed to do?

Please give me some guidance.

Firstly make sure Glide reads your data as number. Is it somehow reading your original data as text?

  1. Have you ever renamed your relation column after you created it? There is a bug that I’m aware of that will not let you create a rollup column against the relation column if the relation has ever been renamed.

  2. Your column appears to be showing in glide as a text column instead of a numeric column. Possibly due to your formatting. Are you handling the formatting, such as the $ and decimal in the sheet? When you view the value in the sheet, is it left aligned or right aligned in the cell? There are a variety of ways to handle this, but essentially, glide is not seeing it as a number.

  3. I’m not entirely agreeing with @Lucas_Pires and @ThinhDinh. You should definitely be able to rollup sum against a multiple relation as long as the column you are summing is numeric. I’m not sure what kind of issues they ran into.

@Jeff_Hager - thank you for the clarification and the quick reply.
Your solution worked and I was able to add a Rollup column that summed the values in each row. There is definitely a bug associated with renaming relationships.
Thank you!

Screen Shot 2020-06-22 at 9.51.40 AM

2 Likes

When I said 60 columns I was not referring to this particular rollup topic, it was my booking app that I needed it (for maths, lookups and relations using your own method of 0.1, 0.2, 0.3 etc)

1 Like

How did you sum the “Lookup” column in “New…”? I did not find possibility to make “Lookup” as a number format because it’s made in Glide date editor.
I did not rename columns and Rel looks made properly

You don’t sum the lookup. You sum the column from the relation.

1 Like

Thanks. I found a way. Gheet formulas work good but It was a problem to spread the formula for new lines so I made a new list in gheet where I took email and count sum with the date taken from the first list. At the second step I made a Relation and Rollup in Glide as written above.