How to sum prices that are in separate rows

Hello,
I’m not an expert spreadsheet user, nor a software developer. Just trying to develop a simple app to keep track of my business.
I have different jobs listed in a given slice, row by row, each row (or job in my case) contains price information as well.
Like:

  • (JobNameA) - Client A - 500$
    *(JobNameB) - Client B - 647$
    *(JobNameC) - Client A - 1200$ etc.
    Now I need help to sum these prices on the app when necessary. For example, I’ll send an invoice to Client A, and I need to see on the app how much they owe me in total by selecting multiple rows or filtering them.
    How can I do this? Hope I could explain the situation
    Thanks in advance
0 4 215
4 REPLIES 4

You will need to use the SUM() function, giving it the list of values to be summed. This list is provided using a SELECT() function. The expression would look something like:

SUM(SELECT(Jobs[Amount], [Client] = [_THISROW].[Client ID]))

How you specifically use this expression may need adjustment based on where in the app you are using it.

For example, if you are sending Client invoices, you are likely cycling through or at least selecting a Client table row (at least I hope so) to generate the invoice for. In the template that creates that invoice, you can use the expression above as is. The [_THISROW].[Client ID] portion would then refer to the column from the Client table.

BUT…if you are using the SUM() expression in some other part of the app, you may need to adjust it based on that context to properly select the rows.

Thank you for the response,
The app is a pretty basic list of jobs, each have the customer, job name and price defined on a row.
I’m sending you a screenshot of the UX, please bear with me as I’m by no means a software developer.
All I need is to get the grand total of multiple jobs I select, so For example I know the total price of Job 1 and Job 3 shown somewhere on the app. I can’t figure out where I should define such a formula or string in the settings.
Hope I make sense,
Thanks in advance
3X_d_0_d0bd40584273cc6cc27fadc86dc51f280094d431.jpeg

There are multiple ways to achieve this and it will largely depend on your app design. The first question to tackle is… How will you be selecting the Jobs that contribute to that grand total?

Thank you for your rapid response and sorry for my delay,
I have different slices, filtering the same list of jobs based on whether the jobs are already invoiced, in progress, or not invoiced etc…
I was thinking… for example on the “Not Invoiced” slice, when I select more than one job (i.e. UEZ2021… and Job B on the screenshot I posted) it could give me the sum total somewhere on the screen? Hope I’m clear, as I said I’m not at all an expert on these things
Thanks

Top Labels in this Space