Frank Freese
asked on
adding values in stacked bar chart
Folks,
I have a stacked bar chart where I would like to add the values and display the total above the bar chart. I need to add AssemblyPerUnit + TotalHousing.
Here's my code that I use to create the chart:
SELECT tblDailyProduction.Product ionDate, qryRearAxleAssemblyPerUnit B26.Assemb lyPerUnit, qryRearAxleAssemblyTotalHo usingB26.T otalHousin g
FROM (tblDailyProduction INNER JOIN qryRearAxleAssemblyPerUnit B26 ON tblDailyProduction.Product ionDate = qryRearAxleAssemblyPerUnit B26.Produc tionDate) INNER JOIN qryRearAxleAssemblyTotalHo usingB26 ON tblDailyProduction.Product ionDate = qryRearAxleAssemblyTotalHo usingB26.P roductionD ate
WHERE (((tblDailyProduction.Prod uctionDate ) BETWEEN [Forms]![frmDailyReport]![ txtStartDa te] AND [Forms]![frmDailyReport]![ txtEndDate ]))
GROUP BY tblDailyProduction.Product ionDate, qryRearAxleAssemblyPerUnit B26.Assemb lyPerUnit, qryRearAxleAssemblyTotalHo usingB26.T otalHousin g
ORDER BY tblDailyProduction.Product ionDate;
I've tried an unbound control but could not get it to work.
I have a stacked bar chart where I would like to add the values and display the total above the bar chart. I need to add AssemblyPerUnit + TotalHousing.
Here's my code that I use to create the chart:
SELECT tblDailyProduction.Product
FROM (tblDailyProduction INNER JOIN qryRearAxleAssemblyPerUnit
WHERE (((tblDailyProduction.Prod
GROUP BY tblDailyProduction.Product
ORDER BY tblDailyProduction.Product
I've tried an unbound control but could not get it to work.
ASKER
this looks to be exactly what i wanted - i'll study it and let you know, many thanks
ASKER
boag200:
Here's my changes but I did not get any data. I added the UNION statement and tried to add values. Please comment.
SELECT tblDailyProduction.Product ionDate, qryDiffCarrierCasePerUnitB 26.[Carrie rCasePerUn itB26] AS [Carrier Case], qryDiffCasePerUnitB26.[Dif fCasePerUn itB26] AS [Diff Case], qryPerUnitBuildTimeStdDiff CarrierAss emblyB26.D iffCarAsem blyBuildTi me AS [Diff Assembly]
FROM (qryPerUnitBuildTimeStdDif fCarrierAs semblyB26 INNER JOIN (qryDiffCasePerUnitB26 INNER JOIN qryDiffCarrierCasePerUnitB 26 ON qryDiffCasePerUnitB26.Prod uctionDate = qryDiffCarrierCasePerUnitB 26.Product ionDate) ON qryPerUnitBuildTimeStdDiff CarrierAss emblyB26.P roductionD ate = qryDiffCasePerUnitB26.Prod uctionDate ) INNER JOIN tblDailyProduction ON qryDiffCarrierCasePerUnitB 26.Product ionDate = tblDailyProduction.Product ionDate
WHERE (((tblDailyProduction.Prod uctionDate ) BETWEEN [Forms]![frmDailyReport]![ txtStartDa te] AND [Forms]![frmDailyReport]![ txtEndDate ]))
GROUP BY tblDailyProduction.Product ionDate, qryDiffCarrierCasePerUnitB 26.[Carrie rCasePerUn itB26], qryDiffCasePerUnitB26.[Dif fCasePerUn itB26], qryPerUnitBuildTimeStdDiff CarrierAss emblyB26.D iffCarAsem blyBuildTi me;
UNION Select Total, Sum(qryDiffCarrierCasePerU nitB26.[Ca rrierCaseP erUnitB26] + qryDiffCasePerUnitB26.[Dif fCasePerUn itB26] + qryPerUnitBuildTimeStdDiff CarrierAss emblyB26.D iffCarAsem blyBuildTi me);
Here's my changes but I did not get any data. I added the UNION statement and tried to add values. Please comment.
SELECT tblDailyProduction.Product
FROM (qryPerUnitBuildTimeStdDif
WHERE (((tblDailyProduction.Prod
GROUP BY tblDailyProduction.Product
UNION Select Total, Sum(qryDiffCarrierCasePerU
fh_freese,
Can you post the output of this query?
Turn it into a MakeTable Query.
Run the Make Table query.
It will create a tbals that I can work with.
Put the table in a sample DB and post it here.
JeffCoachman
Can you post the output of this query?
Turn it into a MakeTable Query.
Run the Make Table query.
It will create a tbals that I can work with.
Put the table in a sample DB and post it here.
JeffCoachman
ASKER
Jeff:
I will honor your request but it will need to be tomorrow -
Many thanks for hanging with me!
Frank
I will honor your request but it will need to be tomorrow -
Many thanks for hanging with me!
Frank
ASKER
Jeff,
Here's the compressed file. There is one form frmDailyReport to excute. It will launch the report in preview. I noticed another problem in that my scale reads:
0
1
1
2
2
3
3
4
Which I do not know why. The first need was to add totals in the stacked bar chart and the second is the scale. Thanks for looking into this. All queries have been include. The date range is 5/1/08 - 5/23/08 in the frmDailyReport
stacked-bar-total.zip
Here's the compressed file. There is one form frmDailyReport to excute. It will launch the report in preview. I noticed another problem in that my scale reads:
0
1
1
2
2
3
3
4
Which I do not know why. The first need was to add totals in the stacked bar chart and the second is the scale. Thanks for looking into this. All queries have been include. The date range is 5/1/08 - 5/23/08 in the frmDailyReport
stacked-bar-total.zip
Thanks,
I will look at this tonight
JeffCoachman
I will look at this tonight
JeffCoachman
ASKER
Do not look at the scale problem....I solved it by simply changing the number format to include a decimal. That;s solved. Many thanks...good luck
Your file seems to have locked my computer,
I will reboot an try again tomorrow
I will reboot an try again tomorrow
ASKER
Let me resend the file. I may have forget to set some of the relationships in my queries. This happened to me but I thought you got a good file. I apologize.
stacked-bar-total.zip
stacked-bar-total.zip
fh_freese,
No, it was not your file, it was my computer.
I've been having trouble with lockups since upgrading to IE7
Jeff
No, it was not your file, it was my computer.
I've been having trouble with lockups since upgrading to IE7
Jeff
ASKER
Jeff,
I have found a solution to placing totals above a stacked bar chart. Interested?
I have found a solution to placing totals above a stacked bar chart. Interested?
sure
ASKER
I kept looking at your solution as it related to what I was wanting to do. It dawned on me that Access provides the data but when a graph is required ownership of the formatting is passed to Excel. The solution was found at:
http://www.andypope.info/charts/StackColTotal.htm
Although this is excel when as I followed these step I got exactly what I wanted.
http://www.andypope.info/charts/StackColTotal.htm
Although this is excel when as I followed these step I got exactly what I wanted.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Basically You need to also plot the total (AssemblyPerUnit + TotalHousing) as a dummy series.
Here is a sample.
Let me know if it is what you wanted
JeffCoachman
Access-EEQ23433478AddTotalSumToS.mdb