Results 1 to 6 of 6
  1. #1
    kbsudhir is offline Novice
    Windows Vista Access 2003
    Join Date
    Apr 2009
    Posts
    10

    Exclamation Cummulative Sum

    Hi,

    I want to generate a cumulative sum of a value of Items. I am arranging the complete data set in decending order of the value of items. Then get the cummulative sum of the values. Please guide me on how to create a query on this.

    Fields are "Item_Name" & "Item_Value".

    Regards
    Sudhir


  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Try

    SELECT Item_Name, Sum(Item_Value) AS TotalValue
    FROM TableName
    GROUP BY Item_Name
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    kbsudhir is offline Novice
    Windows Vista Access 2003
    Join Date
    Apr 2009
    Posts
    10
    Hi Paul,

    Thanks for the time & efforts. But I think I am was not able to explain the properly. I need running total of Item Value. I made the below query but of no use.

    SELECT Query2.SL_No, Query2.Material, Query2.[2012_Stock Value], DSum([Query2].[2012_Stock Value],[Query2],"[SL_No] <" & [Query2].[SL_No]) AS Expr1
    FROM Query2;

    While running the above query its asking to "enter parameter value" for Query 2 which I am leaving blank & in the query results I am getting "Expr1" value as #Error.

    Please guide me on where I am going wrong.

    Regards
    Sudhir

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    May be this link would help: http://support.microsoft.com/kb/290136
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    kbsudhir is offline Novice
    Windows Vista Access 2003
    Join Date
    Apr 2009
    Posts
    10
    Hi Bob,

    Thanks for your time. I already used the link provided by you to understand the concept of DSUM. Thats the reason I created the field for SL_No that I can use that for the criteria. But still I am getting the error.

    Hence I am confused about where I am going wrong.


    Regards
    Sudhir

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    The first two arguments need to be in quotes.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Cummulative Calculations in side Query.
    By cap.zadi in forum Queries
    Replies: 1
    Last Post: 09-09-2011, 12:38 PM
  2. generate cummulative data
    By charlesdicken in forum Access
    Replies: 1
    Last Post: 01-09-2011, 10:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums