Using SUM() agregation in a custom list

Hello,

I´ve built a list with Project records… Each Project may have 1:N tasks and each task will have a number field used as cost/currency.

In the Project list I´ve added a component and set the Magic Text as Sum of all Project > Tasks.cost. My expectation is that each List row would display only its project specific task costs but it is adding ALL task costs in ALL rows.

image

Project Row 1 total is 4.5K
Project Row 2 total is 5K

What I am doing wrong ?

Here is my component config

image

Thank you and Regards

Márcio

Hi @marcio ,

If you think that you hit a limit, probably a good idea to have workaround which is to add another filter based on logged in user email.

Another way of looking at it is any projects associated to logged in user will be summed up regardless the child collections are associated or not from previous filter.

Hello @Yongki , I dont think I hit a limitation, no. I think I am doing something incorrect.
I´ve done a new test, adding a simple text in my Projects screen instead and added the same magic text definition. Same results

image

If I am doing it correctly, then it may be a bug ?

I also did a count() instead and that way it worked… Adding 3 rows

image

Thank you

Hello Márcio,

I believe you need to add Current Project > Tasks > price > sum and not Logged in user’s > Projects > Tasks > price > sum because it’s only one for logged in user and that will show on every list item.

Thank you

1 Like

Hello @dilon_perera Superb !!!

That was it indeed, Thank you !

image

1 Like