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

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

Solved Solved
0 21 563
1 ACCEPTED SOLUTION

Aurelien_0-1677484065793.png

Expression:

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

 

View solution in original post

21 REPLIES 21

How are you selecting them?

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

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

Try SUM( ...your old expression...)

not work. thank

Aurelien
Google Developer Expert
Google Developer Expert

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:

 

Aurelien_0-1677051582904.png

And the SUM() expression is this one:

 

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

 

 

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?


@TonyB wrote:

So on the google sheet (PRODUCT) there are 2 columns named Price and Sum?.


yes


@TonyB wrote:

Did you create an action with that syntax after that?


This one:

Aurelien_0-1677057658295.png

 

 

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

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

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]

act2.JPG

4) I have  build a action [Sommatoria]

act.JPG

something is missing? Thank🙏

Yes.

Check the option "SHOW" for the column rownumber.

Add this column in your view Sommatoria if you still don't see it 🙂

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

2 questions:

1) is the name of the view correct?:

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

2) adding the icon switch next to the column "€" the values ​​disappear.

3.JPG

Hi @TonyB 

Just type this, without any equal sign:

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

🙏 can you ti sendme your app, for to control the differenze with my app. My app not work😭

Aurelien_0-1677484065793.png

Expression:

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

 

Thank! Now work.☺️

How can I change it immediately it took a while to sync then return the value

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

Aurelien
Google Developer Expert
Google Developer Expert

@Viet wrote:

How can I change it immediately it took a while to sync then return the value


Hi @Viet 

You need to use a virtual column for instantaneous computation.

Top Labels in this Space