Sommeren van waarden in tabel

Status
Niet open voor verdere reacties.

Dolfke

Gebruiker
Lid geworden
18 apr 2008
Berichten
195
Hallo allemaal ,

Ben aan het proberen om met grafieken te werken in access .

Hiervoor probeer ik een query te maken die ik gebruik voor mijn grafiek.


Nu stuit ik echter op een probleem , nl.

Elke maand hou ik een uitgave bij bv

jan 2008 512euro
feb 2008 200euro
mar 2008 388euro
apr 2008 104euro
....
dec 2008 255euro

dit vormt mijn colommen grafiek.

Maar nu zou ik ook een lijn grafiek willen met daarin de totaal waardes

dus

Jan 2008 512 euro
Feb 2008 512 + 200 = 712euro
Mar 2008 712 + 388 = 1100 euro
Apr 2008 1100 + 104 = 1204 euro
....
Dec 2008 = totaal uitgave heel jaar 2008


Iemand een idee welke richting ik uit moet ?

Bedankt

Groeten
Romain
 
Hallo Withaar,

Ik werk met access 2003
Kan het zijn dat dit enkel voor 2007 is ?

Groetjes
 
Hallo Withaar ,

Ik ben er bijna uit .

Met onderstaande code krijg ik mijn running totals
Code:
SELECT QryBobsRunningtot.BobsID, QryBobsRunningtot.BObsAmount, (Select Sum(TBLBobs.BobsAmount) as Total From TBLBobs WHERE TBLBobs.BObsDate <=QryBobsRunningtot.BobsDate) AS RunningTotal, QryBobsRunningtot.BobsDate, Format([BobsDate],"yyyy") AS YearDate, Format([BobsDate],"mm") AS MonthDateOrder, Format([BobsDate],"mmm") AS MonthDate
FROM tblBobs AS QryBobsRunningtot
ORDER BY Format([BobsDate],"yyyy"), Format([BobsDate],"mm");

Ik heb enkel nog 1 probleem .

Deze blijven altijd optellen maar ik zou willen dat die in het begin van het jaar opnieuw begint .

Groetjes
 
Ik heb het gevonden , misschien niet ideaal maar het werkt :D

Code:
SELECT QryBobsRunningtot.BobsID, QryBobsRunningtot.BObsAmount, (Select  Sum(TBLBobs.BobsAmount) as Total From TBLBobs WHERE Format([TBLBobs].[BObsDate],"YYYY") = Format([QryBobsRunningtot].[BobsDate],"YYYY") AND Format([TBLBobs].[BObsDate],"mm") <= Format([QryBobsRunningtot].[BobsDate],"mm")) AS RunningTotal, QryBobsRunningtot.BobsDate, Format([BobsDate],"yyyy") AS YearDate, Format([BobsDate],"mm") AS MonthDate, QryBobsRunningtot.AccountGroupID, TBLAccountGroup.AccountGroupName
FROM TBLAccountGroup INNER JOIN tblBobs AS QryBobsRunningtot ON TBLAccountGroup.AccountGroupID = QryBobsRunningtot.AccountGroupID
ORDER BY Format([BobsDate],"yyyy"), Format([BobsDate],"mm");

Groetjes
Romain
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan