Pareto Graph And The DSum Function
May 1, 2008
Hi All,
I currently have a Pareto graph created by a query, that counts occurence and then uses the Dsum function to create the cumalative %. The function is as follows:
CumPct: DSum("[CountofConcern_Number]","qry_ProbByConcern","[CountofConcern_Number]>=" & [Total Concerns] & "")/DSum("[CountofConcern_Number]","qry_ProbByConcern")
This is as per MS article: http://support.microsoft.com/kb/208373
Now this is OK and is as per the MS article but if you have counts that are the same, it just give the same cumalative % for each one that is the same. Please see attached image for an example of what this query produces.
Does anyone know how I can sort this out? TIA
View Replies
ADVERTISEMENT
Mar 19, 2007
hello
i have a query summing sales data by month.
what i need to do is be able to list in this query the sales summed for same period last year.
I have some other criteria but this is the just of it.
trying to use a dsum function in the query itself and using product id and date range derived from fields that calc starting date last year and ending date last year for time period.
example , sum this years jan and feb 2007 sales and also have the dsum function sum jan and feb sales of 2006 in a field right next to the 07 values.
I can not get the dsum function to work???
any
ideas????
i enen tried creating a temp table with the 07 sales data summed and values for each period in seperate fields ie date1 = 01/01/06 and date2 = 1/31/2006 and the same for feb. The dsum did not work that way either.
If i hard code the dates into the dsum it works by i would like it to be more dynamic based on the date1 and date2 values.
View 1 Replies
View Related
Feb 17, 2008
Hi All,
I have a table namely, leave_details wherein there is a column called DAYS and TDAYS,
DAYS columns represent number of leaves an employee has taken in a single leave application and
TDAYS represents Total number of leaves an employee has availled till date.
To calculate the TDAYS i need to SUM the DAYS column for every employee.
When an employee again log in the application he should be aware of the total number of leaves which he has already availed.
Please help me for the same as I am unable to do so.
Kindly revert back for any queries or any further information.
With Warm Regards,
Sanjay
View 3 Replies
View Related
Dec 7, 2013
How is the collection of a sum of money to a particular substance.There is, for example, in the table named baby milk product.How can I collect the amounts of such material only.I used a DSum
View 6 Replies
View Related
Jun 5, 2014
Can Dsum function sums the sales of each customer. For example, let say we have the following query
Code:
QueryCustomerSales
Customer Name
Order ID
Item
Amount
Price
So, can i get output something like :
Code:
John 200.540 $
Mark 300.350 $
I tried the following code "
Code:
Dsum ("[Amount] * [Price]", "QueryCustomerSales", "[Customer Name]= [Customer Name]")
However, it returns the sales of all customers (all together ):
Code:
John 500.890 $
Mark 500.890 $
View 5 Replies
View Related
Nov 25, 2006
I have a Number field with value as
DSum function where the criteria is
Textfield which works well.
=DSum("[MCRef]","Miracle_Cloth_Main","[Cust_ID]='" & [Cust_ID] & "'")
It doesn't show the SUM when the type of
textBox is CURRENCY
Can anyone suggest IF Ineed to change the syntax ?
View 2 Replies
View Related
Feb 16, 2015
How to use Dsum Function? Am using below following Dsum functions but they are not working and shown an error result.
=Nz(DSum("[Liters]","[SRB_SubformQry]","[Category]=MILK"),0)
=Nz(DSum("[Liters]","[SRB_SubformQry]","[Category]='MILK'"),0)
=Nz(DSum("[Liters]","[SRB_SubformQry]","[Category]<>MILK"),0)
View 3 Replies
View Related
Sep 25, 2014
I m using Access 2010.I m Facing a problem in the undermentioned expression,
OPB: 1*Nz(DSum("[Trans]","LogDetail","[LocationID]='" & [LocationID] & "' AND [ProductID]='" & [ProductID] & "' AND [LogDate]<#" & Format([FromDt],"dd-mm-yy") & "#"),0)
when i run the query it gives "Undefined Function 'Format' in Expression" ?
View 3 Replies
View Related
Jun 13, 2005
I came across this Time line db using a box that grows depending on timeline.
Can anyone tell me if it is possible to plot a value using a box that grows in accordance with the value?
This should serve as a replacement for bar graph or an alternative at that.
Please help.
Edwin
View 8 Replies
View Related
Apr 29, 2008
Hi there,
I need to create a graph containing monthly data for numbers of changes raised.
It needs to display the total amount of changes raised split into priority per month like this:
http://i38/photobucket.com/albums/e111/Benson112/Changegraph.jpg
Do i need multiple queries for each month? How do I collate them all together to create the graph?
Thanks in advance
View 4 Replies
View Related
Aug 8, 2005
We have a daily task that generates a dozen graphs. Each day, we want to display the graphs on a large screen monitor for public viewing, preferably as a slideshow. Currently the graphs come from Access 2003. How can we automate getting the graphs in a format that will work with PowerPoint or some other slideshow software?
View 5 Replies
View Related
Sep 29, 2004
I have tried to create graphs in my reports and when I try to resize it, the right side of the graph gets cut off. I am using Access 2000.
When I do the same exercise in Access XP Pro, it works. Can someone help me? I have downloaded the most updated service pack for it as well.
View 2 Replies
View Related
Jun 28, 2006
I am trying to change the fill colors on a bar graph based on the value the bar graph has.
the bar graph gives the percentages of tasks and I would like to have it so that the fill color of a bar is based on the a set of values for the percentage... so if the percentage of task A is between 0 and 25% it should be red, if percentage of task A is between 25% and 50% it should be yellow, and if the percentage of task A is between 50% and 100% it should be green.
this is the query that the graph is based off of
Code:SELECT TEST_RawData.DeliverableDesc, FormatPercent(Avg(PercentComplete)) AS CurrentProgressFROM TEST_RawDataGROUP BY TEST_RawData.DeliverableDesc;
This is the data table of the graph
DeliverableDesc | CurrentProgress
test 1 | 82.64%
test 2 | 55.75%
test 3 | 30.09%
test 4 | 13.00%
now I have looked at this http://support.microsoft.com/?kbid=200527 and tried to remodel it to my situation but have some concerns. This is what I have so far
vba Code: Original - vba Code Private Sub Report_Open(Cancel As Integer) Dim chtObj As Object, strRowSource As String Dim rsRowSourceFiltered As Recordset Dim i As Integer, j As Integer Dim strArrTaskPercents() As String Dim intArrTaskColors() As Integer ' The color integers are those that are used by the QBColor function to assign point colors. Const cBadProgress_Red = 4 Const cOkayProgress_Yellow = 6 Const cGoodProgress_Green = 2 ' Place all the task percents values into an array. ReDim strArrTaskPercents(3) strArrTaskPercents(1) = "10.00%" strArrTaskPercents(2) = "25.00%" strArrTaskPercents(3) = "50.00%" ' Place the task color values into an array. ReDim intArrShipperColors(3) intArrTaskColors(1) = cBadProgress_Red intArrTaskColors(2) = cOkayProgress_Yellow intArrTaskColors(3) = cGoodProgress_Green Set chtObj = Me!Graph10.Object strRowSource = "SELECT TEST_RawData.DeliverableDesc, FormatPercent(Avg(PercentComplete)) AS CurrentProgress FROM TEST_RawData GROUP BY TEST_RawData.DeliverableDesc;" Set rsRowSourceFiltered = CurrentDb.OpenRecordset(strRowSource, dbOpenSnapshot) ' Check to see if the filtered recordset has any records. If rsRowSourceFiltered.BOF And _ rsRowSourceFiltered.EOF Then MsgBox "There are no records to chart." Exit Sub End If ' Loop through the recordset containing the chart's filtered RowSource. rsRowSourceFiltered.MoveFirst i = 0 While Not rsRowSourceFiltered.EOF ' Index i synchronizes the Points collection index with the current recordset row. i = i + 1 ' Loop through the task percents array and look for a match with the field names of the chart's filtered RowSource. For j = 1 To UBound(strArrTaskPercents) ' 1-based ' The first field in the recordset contains the task percent. Some tasks may not be in the filtered recordset. If rsRowSourceFiltered.Fields(0).Value = strArrTaskPercents(j) Then ' Because every task has a corresponding color, the arrays strArrTaskPercents and intArrTaskColors always contain the same number of elements. Assign the color of the chart column, bar, slice etc. Graph10.SeriesCollection(1).Points(i). _ Interior.Color = QBColor(intArrTaskColors(j)) End If Next rsRowSourceFiltered.MoveNext WendEnd Sub Private Sub Report_Open(Cancel As Integer) Dim chtObj As Object, strRowSource As String Dim rsRowSourceFiltered As Recordset Dim i As Integer, j As Integer Dim strArrTaskPercents() As String Dim intArrTaskColors() As Integer ' The color integers are those that are used by the QBColor function to assign point colors. Const cBadProgress_Red = 4 Const cOkayProgress_Yellow = 6 Const cGoodProgress_Green = 2 ' Place all the task percents values into an array. ReDim strArrTaskPercents(3) strArrTaskPercents(1) = "10.00%" strArrTaskPercents(2) = "25.00%" strArrTaskPercents(3) = "50.00%" ' Place the task color values into an array. ReDim intArrShipperColors(3) intArrTaskColors(1) = cBadProgress_Red intArrTaskColors(2) = cOkayProgress_Yellow intArrTaskColors(3) = cGoodProgress_Green Set chtObj = Me!Graph10.Object strRowSource = "SELECT TEST_RawData.DeliverableDesc, FormatPercent(Avg(PercentComplete)) AS CurrentProgress FROM TEST_RawData GROUP BY TEST_RawData.DeliverableDesc;" Set rsRowSourceFiltered = CurrentDb.OpenRecordset(strRowSource, dbOpenSnapshot) ' Check to see if the filtered recordset has any records. If rsRowSourceFiltered.BOF And _ rsRowSourceFiltered.EOF Then MsgBox "There are no records to chart." Exit Sub End If ' Loop through the recordset containing the chart's filtered RowSource. rsRowSourceFiltered.MoveFirst i = 0 While Not rsRowSourceFiltered.EOF ' Index i synchronizes the Points collection index with the current recordset row. i = i + 1 ' Loop through the task percents array and look for a match with the field names of the chart's filtered RowSource. For j = 1 To UBound(strArrTaskPercents) ' 1-based ' The first field in the recordset contains the task percent. Some tasks may not be in the filtered recordset. If rsRowSourceFiltered.Fields(0).Value = strArrTaskPercents(j) Then ' Because every task has a corresponding color, the arrays strArrTaskPercents and intArrTaskColors always contain the same number of elements. Assign the color of the chart column, bar, slice etc. Graph10.SeriesCollection(1).Points(i). _ Interior.Color = QBColor(intArrTaskColors(j)) End If Next rsRowSourceFiltered.MoveNext WendEnd Sub
these are my concerns
- first is the strucutre and syntax for the above Sub Report_Open good?
-second how do I match percents the query is outputting to the table to the percents I write in the strArrTaskPercents array
-third how would I change how it matches percents so that it matches a range of percentages, like the first example if something is between 50% and 100% it should be green.
if anyone can directly help with the code, or indirectly point me to some examples, articles, etc. that might help me it would be greatly appreciated.
View 3 Replies
View Related
Jul 30, 2007
I want to add to values based on if yes or no is selected in an option group.
My thinking is to use DSUM. When 'yes' is selected I want to grab a value from one field and add it to a value in another field giving a running total. I am currently using the following code but it throws back an error. Is DSUM the way to go?
Case 1
txtTotal.Value = DSum("[s1]", "[s2]")
View 3 Replies
View Related
Mar 29, 2008
Hi there guys, ill keep it short and snappy,
Im trying to use the Dsum() function to add together the "Quantities" of specific products bought in transactions i.e. the total quantity for a product called "red t-shirt" and the total quantity for another product called "blue t-shirt". the following was the code i tried to use but it just adds together all quantities of all products:
DSum("[Quantity]","Query2","[Product Name] =[Product Name]")
Does anyone have any ideas at all please?
Thanks
View 7 Replies
View Related
May 17, 2005
Ok, I have a commercial database over which I have no control. It is ticket sales and I want to view them over time...
This is my table of transactions:
master_tix_header
tix_header_year
tix_header_performance_code
tix_header_no_seats - The number of seats sold
tix_header_first_transaction_date - The date of the transaction
The unique ID of the performance is made up of tix_header_year and tix_header_performance_code:
E.g.
In tix_header_year of 2004 there is a tix_header_performance_code of JSVH01 and in 2005 there is also JSVH01 - but there is never the same tix_header_performance_code more than once in the same tix_header_year...
Now I can get the number of tickets sold on each day using Sum() for a specific performance using:
SELECT SUM(tix_header_no_seats) AS TotalSeats, tix_header_first_transaction_date
FROM master_tix_header WHERE
tix_header_year = "2005"
AND tix_header_performance_code - "JSVH01"
GROUP BY tix_header_first_transaction_date;
This gives me:
TotalSeats tix_header_first_transaction_date
2 14/03/05
9 18/03/05
1 22/03/05
But what I want is:
TotalSeats tix_header_first_transaction_date
2 14/03/05
11 18/03/05
12 22/03/05
Can anyone give me any pointers?
I tried http://support.microsoft.com/kb/138911/ but it returned ambiguous results (seemed to reset the running total at the begining of each year...) or would say the query was too complex to run - I;ve probably missed something simple as I a newbie to the world of access/sql
TIA
Nick
PS: Access 97 if that makes any difference!
View 5 Replies
View Related
Jul 5, 2005
I am trying to add up the total amnt under a certain location # under a certain representative #. What im having the query do it pull information from several different tables including the rep # and that rep #'s loc #. I want to find the sum of the sales under the location # for that rrep #. So it will look it up based on the loc # after it finds the rep #'s loc #. What would be the best way to do that.
View 1 Replies
View Related
Oct 2, 2006
Hi!
Can someone tell me why the following querie doesn't work?
txtcharges = DSum("[Charges]", "tblcharges", "[DateCharges] >= '" & startdate & "' AND [dateCharges] <= '" & enddate & "'") '
Thanks
JonyBravo
View 3 Replies
View Related
Apr 23, 2007
Hi,
I have a table that contains Product, Manufacturer, Date and Cost and want to have a field that sums up totals based on criteria, for example, total cost for each manufacturer over a set period.
I think I need to use a dsum, but although I've tried to structure this query, I'm getting nowhere fast!
Any help is appreciated!!
P.s. I have no sql expereince, so please can any response not include a brilliant, but greek-to-me sql! :o
View 5 Replies
View Related
Jul 17, 2007
What do I do if wanting to sum my data in a table if it is text in the field that groups them together. In the examples, the grouping is by productID, but my grouping is by a text field.
DSum("[Amount Aus]","Costs","[Costs.Area]=" & [Costs.Area] And "[Costs.Project Code]=" & [Costs.Project Code]")
The Costs.Project Code is the text field. The Costs.Area part works fine, but not Costs.Project Code
Any help would be great
View 9 Replies
View Related
Jan 7, 2008
Hi Guys,
Look, I have a table to record supplier invoices for vehicle maintenance services.
The fields at this table are:
1. [Vehicle_License_Plate] - text - this is to input the vehicle ID, or registration
2. [Supplier_ID] - text - this is to input the supplier ID, or supplier code
3. [Invoice] - text - this is to input the supplier invoice number
4. [Invoice_Date] - date/time - this is to input the invoice date
5. [Service] - text - this is to input the type of service, from a pre-determined list
6. [Amount] - number - this is to input the invoice amount
7. [Accepted] - yes/no - this is to input whether the invoice has been accepted by our services or not
8. [Accounting] - date/time - this is to input the date when invoice has been booked in the accounting system
Furthermore, at my main vehicle table (the one where all the information respective to a vehicle is recorded), I have some fields where I need to have the total amount spent per service type (one field for each type of service).
In my intention to have an update query calculating the values for these fields, based on the supplier invoices table, I'm having a problem...
At the update query, I'm saying that I want to update i. e. field [Cost_Transportation], on my main vehicle table to the result of the following formula:
DSum("[Amount]";"DB_Supplier_Invoices";"[Service]='TRA'")
Problem is that, instead of having the total "Transportation" amount for the each vehicle well calculated and updated at the main vehicle database field, I'm getting the overall total transportation amount from the supplier invoices table, and this total amount is then updated on all [Cost_Transportation] fields at my main vehicle table.
Istead, what I would need was a formula that could calculate, from the "DB_Supplier_Invoices" table, the total [Amount] per service AND per vehicle, and then update the fields at the main vehicle table accordingly.
Any help will be highly appreciated!!
Should you require further clarification, please advise.
Many thanks and best regards.
View 4 Replies
View Related
Jul 3, 2005
A while back a colleague at work (who has since left my company) showed me an example of a graph within a Data Access Page in the Microsoft Northwind database. The Northwind database that I've downloaded doesn't contain such an example. Does anyone know of a Northwind DB with an exmaple of a graph embedded into a Data Access Page?
View 2 Replies
View Related
Jan 4, 2006
I am trying to export the result of a query to a specific Excel sheet where I have a dynamic graph. The results are exported on a monthly basis, so I am just adding the data, and the graph reflects that. Now, I can export to excel easily enough by using the Transfer Spreadsheet method, but this creates a new worksheet, thus destroying my lovely graph. I have even tried the Output Query method, but to no avail. Is there any way I can export to excel and keep the graph intact?
David
View 2 Replies
View Related
Nov 16, 2006
Hello,
I got a simple graph on my form based on the following query:
date | ordercount:
-------------------------
16/11/06 20
15/11/06 18
14/11/06 19
13/11/06 18
10/11/06 19
09/11/06 18
My graph is leaving out the TOP record and my datasheet I get this result:
16/11/06 | 20
-------------------------
15/11/06 18
14/11/06 19
13/11/06 18
10/11/06 19
09/11/06 18
So as you can see, my graph is actually confusing my TOP record with the title and that's why it's not showing. So how can I fix this?
On a sidenote:
As you can see, I didn't work on 11/11 & 12/11 but my graph is still showing those dates but of course with value 0. How can I leave out dates where I created no orders?
Kind regards,
B.
View 2 Replies
View Related
Jun 25, 2007
Hello :D I have an issue with Access I was hoping someone could help me on. So I have this pie chart graph with 3 sections, colored red for East, Green for West, and Blue for North. Now the problem is that sometimes, the data that I pull in doesn't have a "West" and therefor doesn't add it to the chart. This, however, throws the coloring scheme off as it assigns colors so that 1 is red, 2 is green, 3 is blue rather than East is red, West if Green, and North is Blue. I'll provide some images so it'll be easier to understand. (Clickable thumbnails)
http://img509.imageshack.us/img509/3600/beforefb5.th.jpg (http://img509.imageshack.us/my.php?image=beforefb5.jpg) http://img514.imageshack.us/img514/4678/aftermo0.th.jpg (http://img514.imageshack.us/my.php?image=aftermo0.jpg)
View 3 Replies
View Related
Jan 31, 2008
Is it possible to put a graph in an graph in an outlook message? I realize I will need to use an outlook object but not sure how to start off - ?
View 3 Replies
View Related