Solved Sum total 1 column (1 Viewer)

KoskeKos

New member
Local time
Today, 17:41
Joined
May 4, 2021
Messages
28
Hi.
I need to run trough rows,
sum total value in column and
use that value for further calculations.


1662478212495.png
 

jdraw

Super Moderator
Staff member
Local time
Today, 11:41
Joined
Jan 23, 2006
Messages
15,379
?? More info needed??
What do the various records(lines) represent?
 

Gasman

Enthusiastic Amateur
Local time
Today, 16:41
Joined
Sep 21, 2011
Messages
14,311
Use DSum() ?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 11:41
Joined
Feb 19, 2002
Messages
43,296
Are you asking for a running sum? If so, you MUST have a unique identifier in the record. Do you have one? If not, you can create a running sum in a report or VBA code but without an "anchor", you won't be able to do it in a query. A Running sum sums all the records "before" this one. In order to get the records in a specific order and keep them there, you need something unique on which to sort. Both a report and a VBA loop can work on physical order which may or may not produce the results you are looking for.
 

KoskeKos

New member
Local time
Today, 17:41
Joined
May 4, 2021
Messages
28
Thank you all and Sorry for delay...This is situation:
I have
1662632763706.png


I need sum InitExposure_Gross column
and use that value for further calculations.
 

XPS35

Active member
Local time
Today, 17:41
Joined
Jul 19, 2022
Messages
159
Use the DSum function.
Code:
YourVar = DSum("InitExposure_Gross", "YourTable")
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:41
Joined
May 7, 2009
Messages
19,245
I need to run trough rows,
sum total value in column
use Total Query:

SELECT ID_CLIENT, SUM(InitExposure_Gross) As SumExposure FROM yourTableName
GROUP BY ID_CLIENT;
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 11:41
Joined
Feb 19, 2002
Messages
43,296
You didn't answer my question regarding a running sum. The other people are guessing as to what you actually need. Please post a picture of the results you want.

@XPS35 assumed you wanted ONE figure and that was the sum of all the rows in the table AND you wanted it for use in VBA
@arnelgp assumed you wanted the results in a query with one line for each client and a sum of the column for that client
 

KoskeKos

New member
Local time
Today, 17:41
Joined
May 4, 2021
Messages
28
You didn't answer my question regarding a running sum. The other people are guessing as to what you actually need. Please post a picture of the results you want.

@XPS35 assumed you wanted ONE figure and that was the sum of all the rows in the table AND you wanted it for use in VBA
@arnelgp assumed you wanted the results in a query with one line for each client and a sum of the column for that client
Sorry for lack of info.
Data come in once a month. I need to sum last column "InitExposure_Gross". Thats why i posted second picture (first time i did it in hurry :) ). I realized that i had Date field for "anchor". I will try to use XPS35 solution cause i think it will do the job.
And if dont, i'll buy beer for everyone. Cold. 🍻🍻🍻
 

Users who are viewing this thread

Top Bottom