G
Guest
I posted on this subject recently but didn't have all my ducks in a row then,
so I'm reposting with clarifications.
I am producing reports that describe defect rates involved in product
packing. I need to group and sort the defects first by responsible party and
next by defect ID. I have a query that aggregates data from another query
and produces what I need, including count based on defect type and the sum of
all defects (the latter is currently repeated in each row and is just for
calculation purposes). The SQL is as follows:
SELECT First([Order Setup Defects Query].[Defect Description]) AS [Defect
Description Field], Count([Order Setup Defects Query].[Defect Description])
AS DefectCounts, DSum("DefectCounts","[Order Setup defects GRAPH Query]") AS
DefectSum
FROM [Order Setup Defects Query]
GROUP BY [Order Setup Defects Query].Responsibility, [Order Setup Defects
Query].[Defect ID]
ORDER BY Count([Order Setup Defects Query].[Defect Description]) DESC ,
[Order Setup Defects Query].Responsibility DESC , [Order Setup Defects
Query].[Defect ID];
For the most part this works as desired and generates results along the
lines of these:
Defect Count Sum
Labels Missing 9 30
Docs missing 7 30
Other crap 5 30
Still more crap 5 30
Etc 3 30
Last and least 1 30
My problem is I need to drive a Pareto Chart from this. My chart works well
except for the plot of cumulative percentage. I used an algorithm that seems
to be fairly common in these situations, but it didn't work properly.
The problem is that the algorithm requires a unique ascending or descending
ordinal key of some type when calculating the running total. Based on my
sorting and grouping requirements, I don't have this nor can I see how to
create one on the fly. So I'm desperately hoping someone has an alternative
that will work. This is the only thing stopping my project from being
released.
Thanks in advance for any ideas,
Randall Arnold
so I'm reposting with clarifications.
I am producing reports that describe defect rates involved in product
packing. I need to group and sort the defects first by responsible party and
next by defect ID. I have a query that aggregates data from another query
and produces what I need, including count based on defect type and the sum of
all defects (the latter is currently repeated in each row and is just for
calculation purposes). The SQL is as follows:
SELECT First([Order Setup Defects Query].[Defect Description]) AS [Defect
Description Field], Count([Order Setup Defects Query].[Defect Description])
AS DefectCounts, DSum("DefectCounts","[Order Setup defects GRAPH Query]") AS
DefectSum
FROM [Order Setup Defects Query]
GROUP BY [Order Setup Defects Query].Responsibility, [Order Setup Defects
Query].[Defect ID]
ORDER BY Count([Order Setup Defects Query].[Defect Description]) DESC ,
[Order Setup Defects Query].Responsibility DESC , [Order Setup Defects
Query].[Defect ID];
For the most part this works as desired and generates results along the
lines of these:
Defect Count Sum
Labels Missing 9 30
Docs missing 7 30
Other crap 5 30
Still more crap 5 30
Etc 3 30
Last and least 1 30
My problem is I need to drive a Pareto Chart from this. My chart works well
except for the plot of cumulative percentage. I used an algorithm that seems
to be fairly common in these situations, but it didn't work properly.
The problem is that the algorithm requires a unique ascending or descending
ordinal key of some type when calculating the running total. Based on my
sorting and grouping requirements, I don't have this nor can I see how to
create one on the fly. So I'm desperately hoping someone has an alternative
that will work. This is the only thing stopping my project from being
released.
Thanks in advance for any ideas,
Randall Arnold