Trying to create a running total - DSUM?

samMSaccess31

New member
Local time
Today, 15:20
Joined
Jul 2, 2012
Messages
6
Hi everyone,

So I'm trying to create a running total, to be able to graph a cumulative total. After looking around, I think I've figured out that I need to use a DSUM formula. Can anybody help me out?

I basically want to get a cumulative sum of profit in the 4th column.

Image attached, thanks!
 

Attachments

  • DSUM.PNG
    DSUM.PNG
    6.3 KB · Views: 161
I've attached the current SQL:

SELECT [Cash_Raw Data].[Session ID], [Cash_Raw Data].[Start Date], [Cash_Raw Data].Profit
FROM [Cash_Raw Data];


I've struggled with this for a little while so if anybody could give me a hand with it that would be great!
 
Click the Sigma sign in the menu/toolbar.
attachment.php
7iYAAAAASUVORK5CYII=
 

Attachments

  • sigma.jpg
    sigma.jpg
    2.4 KB · Views: 461
I'm sorry, I don't think that helps me with what I'm looking for...

I'm trying to create a 4th column that formulates a CUMULATIVE SUM of the individual profits listed in the 3rd column
 
Lol, thank you for that...believe it or not I had already tried that....

From looking on google, I sorta found out that I am supposed to use the DSUM function. As it is quite complex and I am a bit of an access rookie, I couldn't get it to work. Thus the reason I posted it on this forum with hopes that somebody could help me out.
 
It would have helped if you showed us what had you tried.

It's something like this:
Code:
DSum("[Profit]", "[[COLOR="Blue"]qryCash_RawData[/COLOR]]", "[Session ID] <= " & [Session ID])
... but the new query, qryCash_RawData which you will create to include all three fields, needs to be sorted by Session ID in ascending order. Otherwise, you can swap that for Start Date and sort it in ascending order. Whichever field you decide to sort against is the field you will use in the DSum criteria.
 

Users who are viewing this thread

Back
Top Bottom