Sum selected values in a list.( Somma valori selezionati in una lista.)

how to get the Sum of selected values in a list.

How are you selecting them?

1 Like

Try SUM( …your old expression…)

not work. thank

I select rows on a view. thank

Hi @TonyB

You may want to apply bulk action, like “make part of the sum”: yes or no’ and apply your sum to these rows.

Depending on your need, you will then make an expression such as:

SUM(
  SELECT(yourTable[yourColumnToSum], 
    [partOfSumCalculation]
  )
)

For reference:

SUM() - AppSheet Help

SELECT() - AppSheet Help

Use bulk actions - AppSheet Help

1 Like

I select rows in a view with 5 column. Only 1 column have numerico value.

Brunasso Cristofaro
Via Nino Bixio 10 - 10092
Beinasco (TO)
Tel. 3425795508

Hi @TonyB

You could try this option if that makes sense to you:

Screen Recording 2023-02-22 at 08.35.38.53 AM.gif

or, with the Bulk Action way:

Screen Recording 2023-02-22 at 08.37.54.04 AM.gif

Basically this is made of these columns:

And the SUM() expression is this one:

SUM(
  SELECT(PRODUIT[Price],
    [sum?]
  )
)
2 Likes

The second solution is ok.
So on the google sheet (PRODUCT) there are 2 columns named Price and Sum?.
Did you create an action with that syntax after that?

1 Like

yes

This one:

1 Like

But on the column sum?, i must insert this sintax? =FALSE()

No, just the initial value should be set as FALSE in your Sheets.

1 Like

Sorry but not work. i have build this:

  1. worksheet named [Elencospese] with 3 columns [Dettaglio], [€], [Calcola]

  2. The column [Calcola] containe the value [FALSE] only first row

  3. I have build a View [Elenco spese]

  1. I have build a action [Sommatoria]

something is missing? Thank :folded_hands:

1 Like

Yes.

Check the option “SHOW” for the column rownumber.

Add this column in your view Sommatoria if you still don’t see it :slightly_smiling_face:

And set the view name with the sum expression, in the Appearance section (make sure to select the flask icon)

1 Like

2 questions:

  1. is the name of the view correct?:

=“Sommatoria” & =SUM(SELECT(List of expenses[€],[Calculate]))

  1. adding the icon switch next to the column “€” the values ​​disappear.

1 Like

Hi @TonyB

Just type this, without any equal sign:

"Sommatoria" & TEXT(SUM(SELECT(List of expenses[€],[Calculate])))
1 Like

:folded_hands: can you ti sendme your app, for to control the differenze with my app. My app not work :sob:

1 Like

Expression:

"SUM prices= " & TEXT(SUM(SELECT(PRODUIT[Price],[sum?])))
2 Likes

Thank! Now work.:smiling_face:

2 Likes

But it takes time to sync how can I do it immediately