How to achieve sum of rows + sum of colums

i want to calculate sum of rows and sum of colums of my table (sumA / sumB / sumC)

when i insert a virtual column “sum” for column “count” i use following expression (IF([product]=“sum”,SUM(SELECT(table1[count],[product]<>“sum”)),[count])) >>>

a new colum is insertet in the UX with “count-value” of each row and aditionally one “sum-value” - this is all done in a separate colum

  • but i want the “sum”-Values at the end of the rows / columns

how can i achieve this? many thanks in advance !

3X_3_e_3e1b80ecef365e3c6cdd55b145bf4451a9904f36.jpeg
3X_8_1_8123d45312fd4e396979cc9a918293aa98864791.jpeg



3X_b_9_b973607d3b90f270ee131429096cebf3077e8943.jpeg

0 3 173
3 REPLIES 3

I’m not sure exactly which part you’re asking about.

Is your image with the “A”,“B”, and “C” supposed to be the end goal? From your posted expression it seems that you forgot to multiply [count] by [weight] in the “else” argument, and you’re summing up the wrong column ([count] instead of [sum_of_count]) in the “if” argument.

Or are you asking how to get the totals of the [count] and [weight] columns?

Or both?

a) i want to get the totals of the [count] and [weight] colums
(>>> see mark “a”) and
b) the total of “count x weight” for each product (>>> see mark “b”)
and
c) count x weigth for “all products” in stock (>>> see mark “c”)

3X_9_0_901517d045d4cebc7dbcaa460c9655c0e3fbea1f.jpeg

how do i have to setup Appsheet that all “totals” are placed exactly as on my screenshot in the resulting report ?

a) totals [count] and total [weight] at bottom of colums (positions “a”)
b) totals [count] x [weight] at the end of rows of each product (positions “b”)
c) “overall total” at positon “c”

many thanks in advance for your help!

For “b” and “c”, just change your expression to the following (changes highlighted in bold)

For “a”, that’s a bit tougher. Presumably your [count] and [weight] are real columns, and are meant to receive user input. The latter means you can’t simply add an App Expression to them, and even if you could, the former means that the expression would only re-evaluate if that record gets edited.

You’ll have to set the values of those 2 columns, in the “sum” record, upon every edit of any other record in the Table. You can do so by running a “reference action” (Action of type “execute an action on a set of rows”), either via Form Save, or via a Bot.

Top Labels in this Space