Pivot Table Calculated Field Average and Std Deviation (control chart)

Minx_Minxy

New Member
Joined
Jul 13, 2015
Messages
37
Office Version
  1. 365
Platform
  1. Windows
Hello,

Apologies if this is in another thread, I did a search on control chart on the threads with no luck.

I am trying to create a pivot table that will provide me with a control chart

I am looking at having a data model with calculated fields named "Control Line", "UCL", "LCL" and "Std. Dev", per the image attached.

In "Data", I have the total count of document IDs we receive for each month divided by 21

Control Line I need the average of Data column

Std.Dev I need the formula =STDEV.S ([Data])

UCL will be = "Control Line"+("Std.Dev"*3)

LCL = "Control Line"- ("Std.Dev"*3)

I have tried adding the average for the "Data" column but all I am getting is errors. Nothing is working.

Help is very much appreciated.
 

Attachments

  • Screenshot 2024-10-08 164245.jpg
    Screenshot 2024-10-08 164245.jpg
    39.5 KB · Views: 8

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hello!
Can I have a small example of your original table with test data?
 
Upvote 0
Hello!
Can I have a small example of your original table with test data?

Here

M + YDateDoc ID
Oct202202/10/202254902366
Oct202202/10/202254902365
Oct202202/10/202254902365
Oct202202/10/202254902365
Oct202202/10/202254902364
Oct202202/10/202254902364
Oct202202/10/202254902364
Oct202202/10/202254902364
Oct202203/10/20222000498080
Oct202203/10/20222000498064
Oct202203/10/20222000498011
Oct202203/10/20222000498011
Oct202203/10/202254903096
Oct202203/10/202254903096
Oct202203/10/202254903025
Oct202203/10/202254903024
Oct202203/10/202254902990
Oct202203/10/202254902989
Oct202203/10/202254902988
Oct202203/10/202254902987
Oct202203/10/202254902982
Oct202203/10/202254902959
Oct202203/10/202254902944
Oct202203/10/202254902944
Oct202203/10/202254902921
Oct202203/10/202254902920
Oct202203/10/202254902919
Oct202203/10/202254902918
Oct202203/10/202254902913
Oct202203/10/202254902678
Oct202203/10/202254902673
Oct202203/10/202254902673
 
Upvote 0
Hello! The point is that measures cannot directly use other measures or a calculated column in formulas. There may be a way around this, but I don't know it.
I apologize if I gave you hope of resolving the issue.
 
Upvote 0
Hello! After studying the manuals a little, you can still solve your issue. In particular, this resource gave food for thought.
That is, using the VALUES parameter you can solve issues.
VALUES is one way to create your own table (a table with one column with unique values).
Here's what I got
M + YDateDoc IDRow LabelsDataControl LineUCLLCLStd.Dev
Oct202202.10.202254902364Oct20221,521,521,5238095241,520,00
Oct202202.10.202254902364Nov20220,100,100,0952380950,100,00
Oct202202.10.202254902364Grand Total1,620,812,952380952-1,330,71
Oct202202.10.202254902364
Oct202202.10.202254902365
Oct202202.10.202254902365

Measures that have been created
Data
Excel Formula:
=COUNT(Table1[Doc ID])/21
Control Line
Excel Formula:
=AVERAGEX(VALUES(Table1[M + Y]); [Data])
UCL
Excel Formula:
=[Control Line]+([Std.Dev]*3)
LCL
Excel Formula:
=[Control Line]-([Std.Dev]*3)
Std.Dev
Excel Formula:
=STDEVX.P(VALUES(Table1[M + Y]); [Data])

Of course, this is all at a primitive level, but the direction is what you need.
P.S. I was interested in figuring this out myself. There is room to move. Good luck.
 
Upvote 0

Forum statistics

Threads
1,223,883
Messages
6,175,167
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top