Bar chart question

  • Thread starter Thread starter Angela
  • Start date Start date
A

Angela

I have a bar chart, created using the wizard. It shows the sum weight of a
product for each shift. The query (created thru the wizard) pivots off of
the winder field, so for each shift the chart shows a bar for the sum weight
for winder = true and another for winder=false. Instead of winder=false, I
would like winder=true or false (so it shows the total sum weight for each
shift, next to the sum for winder only). I can't see any way to change the
bar chart and am unsure how to change the pivot table to include both winder
= true and the total.

This is the sql for the chart recordsource:
TRANSFORM Sum(qryCullReport.[WeightTons]) AS SumOfWeightTons
SELECT qryCullReport.[ShiftC]
FROM qryCullReport
GROUP BY qryCullReport.[ShiftC]
PIVOT qryCullReport.[Winder];

Can anyone help?
 
I would change the SQL to a standard totals query with SQL like:

SELECT qryCullReport.[ShiftC], Sum(WeightTons) as TotalTons,
Sum(Abs(Winder) * WeightTons) as WinderTons
FROM qryCullReport
GROUP BY qryCullReport.[ShiftC];
 
Back
Top