Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Building Pareto Charts

Status
Not open for further replies.

bakershawnm

Programmer
Apr 18, 2007
84
US
I have a bunch of Pareto charts that I use to drive process improvements. I originally used the following formula in a SQL query to calculate the percentages:

CumPct: DSum("[SumOfDefectQty]","Build_AssyPrto","[SumOfDefectQty]>=" & [DefectsTotal] & "")/DSum("[SumOfDefectQty]","Build_AssyPrto")

Assume the table is sorted by SumOfDefectQty.

However it is not entirely accurate. If you have multiple records with the same total defects you will get a flat line from one point to the next instead of a progression towards 100%

I now use vb code behind my open form button to read through the table building the percentage before I actually open the form.

However it requires a forced delay of sometimes up to 5 seconds before the form opens to ensure the pareto line comes out correctly (not flat line at 0%).

strt = Timer
Do While Timer < strt + 2.5
Loop

Is there a better way of doing this? Does anybody have a way to modify the above formula so that it gives the desired results?

(I attempted to add example PDFs put couldn't get it to work)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top