473,796 Members | 2,578 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Create a Query that provides a running total but grouped?

8 New Member
I need to create a query that produces running totals for every group within my table for example i wish to see: -

Group A

[running total] 1
[running total] 5
[running total] 9
[running total] 15

Group B

[running total] 1
[running total] 2
[running total] 20

etc..

I have worked out how to produce a running total but this will produce it for all records in the table and not split it (or reset it when it find a new group). Also this method works on the Unique ID which will fail due to the grouping required.
Sep 26 '06
16 11324
PEB
1,418 Recognized Expert Top Contributor
Ok!

This is because you use grouping, remove your grouping!

And any conditions under this fields!
Sep 26 '06 #11
Gandalf186
8 New Member
Excellent!!

Great stuff, now I have all I need to start my Project!

Thank you very much.
Sep 27 '06 #12
PEB
1,418 Recognized Expert Top Contributor
Great man!!!
:)

Have a nice day!

:)
Sep 27 '06 #13
Narender Sagar
189 New Member
Hi, I was trying to use this code in my query, but I'm also getting duplicate running sum. I'm not able to understand, which groupings I need to remove! Can you please help to fix this.
Thanks
Jul 24 '17 #14
Narender Sagar
189 New Member
Oh! I removed one calculated column from the query and result was perfect. Thanks, matter resolved.
Jul 24 '17 #15
Narender Sagar
189 New Member
Dear all,
How to initialize the value in this code, because whenever I open this query, the values are getting multiplied exponentially.
Jul 25 '17 #16
sebastiansarrow
1 New Member
Thank you everyone for this thread, it has been hugely helpful to me!
Jan 22 '19 #17

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1657
by: NotGiven | last post by:
I have two tables, Client and Project, related by clientID. I want to display a table with total CURRENT projects and total COMPLETED projects per client. I'd like for it to show like this: Client Name Current Proj Completed Proj Stan's Dormers 4 12 Larry Lincoln Dealership 2 1
6
3198
by: Pedro Fonseca | last post by:
Greetings! Can someone please help me to crack this problem? I have 4 tables: Subject, Forum, Topic and Post. A Subject groups various Forums, a Forum groups various Topics, and a Topic groups several Posts. The references inside the tables are: +-----------+ +-----------+ +-----------+ +-----------+ | Subject | | Forum | | Topic | | Post | +-----------+ +-----------+ +-----------+ +-----------+
3
2821
by: Tom | last post by:
I have a report based on a crosstab query that shows monthly automobile sales. The report is grouped on Make so that it shows the models under each Make. I want to now get the subtotals by Make and then the total for all for each month. I find that the control source for the textboxes in the detail section have a date value such as Jan_03 rather than dollars but when I run the report dollars appears in the report. Obviously I can't sum up...
1
2385
by: nick.leggin | last post by:
I have a recordset that includes the following data Location Territory Sales Total Sales % of total sales A location can have multiple territories, and each territory has different sales
4
3136
by: lorirobn | last post by:
Hi, I have a report displaying items that are missing from a room. I created 2 queries, the first getting the items IN the room, and the second being an "unmatched" query that references the first query where Item is Null. I use a subreport for the details, and the results display correctly. However, the Report_Details event of the subreport is executed about 2 or 3 times more than I would expect (I think 3 times when I have a
8
30065
by: nico3334 | last post by:
I have a database that has a Date column (1/1/2007) and a Data column that has numerical data. I am currently running a query to sum the Data column for a certain month and grouped by day (There is more than items of Data for a specific Day). Here is my current query: SELECT SUM(Data) as Total FROM database WHERE Month(Date) = 10 And Year(Date) = 2007 Group by Day(Date) This displays the summed data which is grouped by the Days of...
1
1732
by: silversubey | last post by:
I am using a query to total hours (Cltbudget.CBudhours) and dollars (CltBudget.CBudFee) Grouped by client names (Cltbudget.CBudCltName). here is the Query: SELECT CltBudget.CBudCltName AS Client , SUM(CltBudget.CBudfee) AS 'Total Dollars' , SUM(CltBudget.CBudhours) AS 'Total Hours' FROM VPM.dbo.CltBudget CltBudget, CltDue WHERE CltBudget.CBudDueID = CltDue.CDID AND ((CltDue.CDTarget Between '01-01-2007' And '12-31-2008') AND...
4
2321
by: odavison | last post by:
I'm currently running a crosstab query that displays the total amounts of Appointments that each Consultant. Currently it is Consultant ID as the Rows, and Appointment Date as the top headings, grouped by Date (rather than month etc.) But it is giving me a random order of dates going up numerically by day and no more. Is there any way of giving an order to the Date columns or specifying that is should be for the next 7 days etc? here...
21
17459
beacon
by: beacon | last post by:
Hello to everybody, I have a section on a form that has 10 questions, numbered 1-10, with 3 option buttons per question. Each of the option buttons have the same response (Yes, No, Don't know), but each answer is given a different point value for each question. For instance, question 1 might ask "Do you like candy?" and if you answer Yes you will get +1, No will earn you -1, and Don't know will net you zero points. The next question might...
0
9684
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10459
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10236
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10182
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10017
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9055
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5445
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4120
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.