Queries :: Dividing By Calculated Total Sum Of Two Query Columns

Oct 30, 2013

I currently have a query that pulls selected data from a table. There can be multiple rows of data, and two columns include dollar amounts and quantities. I have a total line going at the bottom so I can see the Grant Total of all the rows (for dollar amounts and quantity).

Is it possible to add a column to this query that will calculate the expression:..?

=Grand Total of Dollar Amts for selected data/Grand Total of Quantity for selected data

I tried to use a query in a query, but must have done something wrong because it just said circular reference.

View Replies


ADVERTISEMENT

Queries :: Make Table Query With Calculated Columns

Oct 8, 2013

I am trying to run a make table query that involves using a linked table in Ms from a SharePoint list. However, a few columns I wish to include in my Make table query are calculated columns from the SharePoint list.

The make table query will not run saying "Calculated columns are not allowed in SELECT INTO statements".

Can any think of a solution or a potential work around to this?

I need to create a table with these columns in it.

View 4 Replies View Related

Queries :: Running Total In Calculated Field

Oct 5, 2013

I want to calculate running total and find out the date when that total is greater than a number.

My initial plan was to use Dsum and then use dlookup to find when that Dsum value > [Fixednum].

But when I try Dsum and use Totals in query, access shuts down. maybe because of 15000 rows.

I have attached a sample database that shows what Im working with and what I would like.

View 2 Replies View Related

Queries :: How To Make Total Columns For ONE Field

Jul 2, 2015

I am trying to create a query that ONLY shows me the total count of each combo box choice for one field. It sounds very easy and I'm sure it is but everything I try tells me I am using the wrong syntax, or requires me to have rows when I only want column totals.

I have a combo box with a dropdown of 10 common places that people travel to. I want the report to ONLY show the total number of people who chose place 1, place 2, place 3... etc. But I always have to do according to date or time or something. I want it to look like this

Place 1 Place 2 Place 3 Place 4
13............36.........3........77

So essentially there would only be one row. But access will not let me. Is there something I'm doing wrong? Or is this not possible?

View 8 Replies View Related

Total Calculated Query

May 4, 2006

Please look at the attached sample db file and the text file explaining the problem.

Thanks

View 1 Replies View Related

Query To Total Columns AND Rows

Jun 2, 2005

Is it possible to total columns in a query? Right now, I have a query that produces the following column counts, but I'd like to total Pending, Overdue, etc. This data is being displayed in a subform.

Process Pending Overdue Total
-------------------------------------
Engineering 1 2 3
Procurement 0 6 6
<etc>
-------------------------------------
TOTAL 1 8 9 <- this is the line I want to add

Here's what the query (qryStatusRptB) looks like thus far:
Field: Process
Table: tblProcesses
Total: Group By

Field: Pending
Table: qryStatusRptA
Total: Sum

Field: Overdue
Table: queryStatusRptA
Total: Sum

Field: TotalRecords: Count(*)
Table:
Total: Expression

Can someone explain how to get the TOTAL ROW in here? (I can do it via another query, but that won't work since the data is displayed in a subform. I've tried crosstabs without success.)

Many thanks,
Christine

View 2 Replies View Related

Queries :: Self-Referencing Running Total Used To Calculate Next Total In A Query

Jul 23, 2015

I am trying to create a query that has a self referencing running total based on the values (point totals) of itself (running total of values in the running total column that have already been calculated for all previous records) plus the total of new points being added in the current record, less the total of points being removed in the current record. This running total can never go below 0, if it does, the running total should restart at zero and add in only new points and begin the process again with the next records

I am able to do this in Excel in less than two seconds so I know there has to be a way to port this into a query. I've attached an excel example of what I am exactly trying to do

If it takes multiple queries to complete the required output I am ok with it. In my previous outtakes I have had up to 8 queries but just couldn't seem to do it..

View 9 Replies View Related

SQl Query For Dividing A Field

Jul 13, 2006

I have to write a SQL statement which can divide Field1 and put the result sets in another field.In plain English I want to say, In Field1 if there is a Comma, put the letters between 2 commas, in field 2, If there is another comma put it in Field3
Field1 is an adress field and has values like 19 Stoney Gardens, Livingston, West Lothian
I want this address to be divided. I am new and am stuck now.
What is the best way to write a SQL query for this.
Many thanks

View 8 Replies View Related

Creating A Running Total Calculated Field

Feb 17, 2006

I have a query, and I want a field that shows the current balance as of that transaction, eg:__________________________________________________ _______|__Transaction ID__|__Type_______|__Amount__|__Balance__||__1______________|__Deposit_____|__£10______|__£1 0_______||__2______________|__Deposit_____|__£30______|__£4 0_______||__3______________|__Withdrawal__|__£15______|__£2 5_______|So far, I have this:SELECT [Transaction ID], [Type], [Amount], (SELECT Sum([Amount]) FROM tblTransactions AS tblTransactions2 WHERE tblTransactions2.[Transaction ID] <= tblTransactions.[Transaction ID]) AS BalanceFROM tblTransactionsWHERE [Account ID]=1;Although this does not look at the 'Type' field; it just adds the amounts; regardless of it being a deposit or withdrawal. I'm really not sure how to add this.Thanks in advance.

View 11 Replies View Related

Calculated Field With Running Cumulative Total

Oct 29, 2012

I need calculated field (in a query) that executes a running cummulative total for three conditions: "="&Project Name, "="&Service and "<="&Date.

I can do it in Excel using SUMIFS(), but have no clue on how its done in Access 2010 !

The "Balance" field should be the end result:

Project Service Date Amount Balance
A Welding 1/1/2012 100 100
A Welding 1/2/2012 120 220
A Wiring 1/3/2012 150 150
B Welding 1/1/2012 103 103
B Painting 1/2/2012 124 124
B Painting 1/3/2012 155 278
C Welding 1/1/2012 106 106
C Wiring 1/2/2012 127 127
C Wiring 1/3/2012 159 286

View 2 Replies View Related

Help With Summing Columns For A Total Production.

Jan 5, 2008

New to MS-Access and I'm trying to help our HR with creating a production tracking table.

This is just a small simple table with all 12 months of the year and a total production column for summing up everything that has been produced for the year. But being "very" new to access I have zero clue on how to do this. I would appreciate any Access for this dummy help I can get . Thanks in advance.

View 3 Replies View Related

Reports :: Take Total Of Columns And Get Average

Jan 13, 2015

I have two columns in my report that at the bottom it gives me the following total, as I put below. I am trying to take the two totals that is gives and get the percentage. 1058/3024 = 35%.

=Sum([TotScrwBlank]) =Sum([TotalAmount]) .349 or 35%
1058 3024

I had did the equation as =Sum([TotScrwBlank])/([TotalAMount]), but this is giving me the answer of 46% which is not correct.

View 3 Replies View Related

Tables :: Calculating Columns Total

Jul 18, 2015

I have a personal expenditure data base indicating daily expenditure on various heads ( File Attached). I want table to reflect expenditure on various heads on daily basis in COLTOT column. Any subsequent change in any of the field to be dynamically updated.Presently I am exporting file to excel and calculating the total there and then manually updating the COLTOT field. Other alternative I tried was to create a form and make a text field and sum the fields using formula like =nz([milk])+nz([vegetables]). I feel it may be unwieldy for such large number of expenditure heads.

View 14 Replies View Related

Calculated Field Pull Total From Another Report Or Form

Dec 16, 2004

I have a report with a calculated field. This calculated field needs to pull the value or total from a field in another report. I think the formula is :
=([AssmntC].Reports!totalreqamnt4)
but I'm getting ?Name as the result.
The report is AssmntB where I need to have the value copied.
The original report is AssmntC and the field is totalreqamnt4 where the value is originally calculated.
totalreqmant4 is also a calculated field which sums fields from a query.

Help with the formula? please?

View 2 Replies View Related

Tables :: Updated Total In Number Value In Single Calculated Row

Jul 10, 2014

I want to create a table having. These fields

(1) amount paid
(2) total fund(calculated field that is =total fund-amount paid)

Up to here every thing is ok but U want to update the total fund field updated in the next row as remaining fund

as
amount paid--------total fund
5000------------20000
1000------------15000
0-------------14000

View 3 Replies View Related

Total Daily Sales Queries By Model/Total

Mar 8, 2008

Hi,

1) I am pretty newbie to this access programming, do forgive me if my questions sounds stupid.

2) Basically I create an application in access capturing or production information for my company. now the top management suddenly wanted whats their main concern:- Total Daily/Monthly, Quarterly, Annual Sales (By Model If possible)

3) I start with daily (Lets don't be too overly ambitious).

4) I try to let user select dates from my calender control and reflect daily sales (in Total & By Model break down) insert into my form.

5) Understand someone told me from my previous post in Calender control I can achieve it either through forms or queries, which is a better way. (in terms of flexibility to change for program maintenance/ scalibility) wise ?

PS: Please forgive my ignorance :o:(

Thanks (In advance) & God Bless.

View 2 Replies View Related

Reports :: Running Total With Multiple Columns

Mar 7, 2013

I am using Access 2003 and trying to create a report that has a running balance of payments into an account. There are also payments out of the account which reduce the balance.

When I add the other columns into the expression for the running total the result shows in the report as "0".

The expression I am using is: =([Escrow Pmt Amount]-[Ins Pmt Amount])

I have this expression in the "Detail" section of the report with the "Running Total" toggled to "Accross Group".

How can I subtract the values in the other columns (Outgoing Payments) from the balance and continue the running total.

The list of payments within the report are date driven and grouped by an account number.

View 1 Replies View Related

Queries :: Adding Calculations To Queries Based On Columns In Query

Feb 18, 2014

I am trying to add calculations to queries based on columns in the query... it seems to randomly expect 'Expression' or 'Group by' as column types, and Im having to create 3 sets of queries following on from each other to de-dupe data and allow filters on calculated values.

Also I've got a function which turns a date into a quarterly cohort, e.g. Oct 2013 -> 20134. I use ot on a lot of dates. I created a VBA function, CohortQ used as follows in queries:

Cohort: IIf Year([InputDate]) < 1990 or Year([InputDate]) > 2020, 0 CohortQ([InputDate]))

In the VBA, InputDate is defined as a date

Code:
Function CohortQ(InputDate As Date) As Integer
If InputDate = 0 Then
CohortQ = 0
Exit Function
End If

[Code] .....

But when I run it on a date field, it gives me a data mismatch error. I can't step through as it's working on 600K rows.
If I put the function into the query,

Cohort: IIf Year([InputDate]) < 1990 or Year([InputDate]) > 2020, 0 Year([InputDate])*10+DatePart("q",[InputDate]))

it works.

View 3 Replies View Related

Forms :: Continuous Form - Calculated Total Field In Footer?

Apr 6, 2013

I have a form that is displayed continuously and there is a text field in it (Text12).In the footer of this form I would like to add a textbox that is the sum of all Text12's on the form.I tried =Sum([Text12]) in the textboxes control source but that is just displaying an error when I run the form.

View 2 Replies View Related

Calculated Columns Showing #error??

Feb 22, 2008

I am using Access 2003. I have a form that shows many calculated columms (some using =Dlookup(), other using =ufMyFunctions() stored in Modules). I update only 2 columns and the the form is set up as a ContinuousForm.

No problem, everything displays when I open it. Also in the form is a call (found in Modules) to function that updates a column on that table. Basiclly when opening the form it could do some updates. As I said everything works great when I open the form.

What I have noticed is that when I open the form using the following:
stDocName = "frmIPMVPCosts"
DoCmd.OpenForm stDocName, acNormal
DoCmd.GoToRecord , , acFirst
DoCmd.GoToRecord , , acLast
DoCmd.Close acForm, "frmIPMVPCosts", acSaveYes

all the columns display #ERROR, except the bound columns, which display correctly. The reason I do this method is on a change of value for some of the columns used in the calculated columns on the form, I need to force an update automatically. Instead of waiting on the user to open and close the form, I do it on a CLOSE event in another form that updated some columns used in the calculated columns. That way the reports can up to date also.

This is a single user system for now. Any ideas why the calculated columns are not visible? Is there some setting I have to do? I use this method on other forms that have no calculated columns and it all works.

Thanking you in advance for any help.

Cheers, Boris

View 3 Replies View Related

Calculated Columns Showing #error??

Feb 22, 2008

I am using Access 2003. I have a form that shows many calculated columms (some using =Dlookup(), other using =ufMyFunctions() stored in Modules). I update only 2 columns and the the form is set up as a ContinuousForm.

No problem, everything displays when I open it. Also in the form is a call (found in Modules) to function that updates a column on that table. Basiclly when opening the form it could do some updates. As I said everything works great when I open the form.

What I have noticed is that when I open the form using the following:
stDocName = "frmIPMVPCosts"
DoCmd.OpenForm stDocName, acNormal
DoCmd.GoToRecord , , acFirst
DoCmd.GoToRecord , , acLast
DoCmd.Close acForm, "frmIPMVPCosts", acSaveYes

all the columns display #ERROR, except the bound columns, which display correctly. The reason I do this method is on a change of value for some of the columns used in the calculated columns on the form, I need to force an update automatically. Instead of waiting on the user to open and close the form, I do it on a CLOSE event in another form that updated some columns used in the calculated columns. That way the reports can up to date also.

This is a single user system for now. Any ideas why the calculated columns are not visible? Is there some setting I have to do? I use this method on other forms that have no calculated columns and it all works.

Thanking you in advance for any help.

Cheers, Boris

View 5 Replies View Related

Queries :: Put A Value From Total Query Into Variable

Nov 21, 2014

I have a query like this

SELECT qryBONUS_pre.PACIENT_ID, Sum(qryBONUS_pred.TOTAL) AS SumOfTOTAL
FROM qryBONUS_pre.TOTAL
GROUP BY qryBONUS_pre.PACIENT_ID;

I like SumOfTOTAL to put into a variable

How to do it

View 2 Replies View Related

General :: Calculated Columns Based On Another Table

Aug 18, 2012

Is it possible to have a calculated column based on another table. i have a 1 to many table. the table that is the parent hold a start time. all of the 'many' have an individual time length. i would like a calculated column in the parent table showing the full length. is it possible or will i have to use an update query?

View 1 Replies View Related

Queries :: Running Total Field In Query

May 20, 2015

I have a table with dates in field1 and an amount of seconds in field2.

field1 field2
01/01/2015, 1345
02/01/2015, -132
04/01/2015, 259

I would like to produce a query that performs a running total in the third column like so:

field1 field2 field3
01/01/2015, 1345, 1345
02/01/2015, -132, 1213
04/01/2015, 259, 1472

This is quite simple to achieve in Excel. (eg =SUM($B$1:B3))

What is the query formula for Access?

View 1 Replies View Related

Queries :: Combine And Total Query Results

Aug 8, 2013

The results of my union query of 2 separate tables looks like:

Name - Count of Participations

Joe Blow - 7
Harry Smith - 11
Kate Upshaw - 8
Joe Blow - 3
Harry Smith - 5
Kate Upshaw - 13

I need to combine the duplicate names and total their participations to make a report look like:

Name - Count of Total Participations

Joe Blow - 10
Harry Smith - 16
Kate Upshaw - 21

View 3 Replies View Related

Queries :: Query To Total Based On Value Of A Field?

Jul 31, 2013

the relevant fields look something like this:

TellerNum - Date - Field1 - Field2 - Field2

I need a way for my query to take all rows with the same TellerNum and add Field1, Field2, and Field3 together for those records. So, there may be 20 records with the same TellerNum, and I need Field 1, 2, and 3 to be added together and then totaled for all 20 records to give me 1 grand total. I need this to be done for each TellerNum, so that the results will be a grand total for each TellerNum. So, the results may look something like this:

TellerNum 1: 486
TellerNum 2: 300
TellerNum 3: 240
etc..

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved