Summing rollups per item

Hi,

I’m trying to sum rollups per item. Is that possible ?
In my relation column I have 3 items, 2 of whom are identical (Raindrops,Whiskers,Whiskers). Is it possible to sum per item ? i.e. summing Raindrops and summing Whiskers so that I have a column with only 2 values corresponding to (Raindrops,Whiskers) ?

Thanks !

Charlie

There are a few different ways to do what youd like… first off, do you need to know how many items per month? In this case, it wouldnt just be the sum of items, but the sum of items per month. To do this, you could create a template column that joins the month and the item together into its own unique value (i.e. January-Whiskers) and then create a relation that relates that template column to itself using a multi-relation. You can then create a rollup that uses that multi-relation as the source, then sum. This will give you the sum of each item per month.

2 Likes

Hi shchc !

Thanks for your answer. In the end I made it work by using templates and by summing in a different table. Now I have another issue which I think is pretty simple to fix : for some reason my rollup field displays 0 in the app. Is that normal ?

It’s tough to tell from your screenshot where the issue could be. Is your inline list or screen filtered? Are you using row owners in your user profile table?

1 Like

Hi shchc,

There is no filter in the inline list, I am not using row owners in my user profile table.
Really it is simply a rollup field that takes value numbers from the “historique” table.

I’ve made a video for Darren from the community :

I hope it helps make sense of it all !

Charlie

It’s not obvious to me from watching that why it isn’t working as you expect.

It would be useful if you show in your video how each of the relevant columns and screen components are configured, rather than just pointing at them. Row owners would have been my first guess. Does anything change if you exit the app to the Glide dashboard and then open it again? Do you see the same thing in the published app?

Thanks Darren,

I don’t understand it either. I am not using row owners at all. I made a new video below, hopefully it is a bit clearer how the whole thing works :

Is this :point_down: column using the Format Date plugin?

If is it, then there is a good chance that is the source of your problem, as that plugin is known to be buggy - especially for non-US date formats/locales. This would also explain why it appears to work fine in the data editor, but not when you view the app.

I’d advise you to get rid of that. There is a much more reliable way to get a month name from a date, without using any plugins:

  • Create a text column (anywhere) and fill it with the names of the months of the year, Jan to Dec, one per row.
  • Create a math column using the following formula: Month(Date)-1, where Date is the column containing the date you need the month name for. This will give you a number between 0 and 11, representing the month index number of the date in question.
  • Now create a Single Value column. It should take “from start” the value of the math column, from the column that contains the names of the months.

Give that a try. I suspect it may solve your problem.

4 Likes

Awesome ! That was it. I can’t believe a simple format date plugin could cause this

Excellent.
Yes, I’ve seen this plugin cause problems on several occasions, so any time I spot it I’m immediately suspicious :wink:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.