Summation of all records in the table #1025
Replies: 3 comments
-
As a user, I'd expect the totals in a given page to total the displayed items only. If you're looking to total/sum across your entire dataset regardless of pagination, then I'd recommend that you select the sum as an additional field, and you should get your desired result. |
Beta Was this translation helpful? Give feedback.
-
I did this, but I still need the amount to change, depending on the filters applied. |
Beta Was this translation helpful? Give feedback.
-
I understand the use case, although I'd disagree with the approach from a user perspective, as a user, showing me a sum of things I can't see would frankly confuse me, and I'd probably assume that the product can't add up. However, you'd just need to do a withSum() in your Builder query, constrained with your query and use that value in the relevant place, (i.e. wherever you wish), I'm just not completely sure that I'm seeing what the new feature or problem is here? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I output the sum of a certain field to secondaryHeader, but there is a nuance $rows->sum(field) sums up only on the current page.
How can I make a summation across all pages.
Beta Was this translation helpful? Give feedback.
All reactions