+ Reply to Thread
Results 1 to 11 of 11

Charting Rolling Mean plus Standard Deviations of Attribute Data

  1. #1
    Registered User
    Join Date
    02-09-2022
    Location
    Wisconsin, USA
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    13

    Charting Rolling Mean plus Standard Deviations of Attribute Data

    I am a novice here and there is likely a better more efficient way to accomplish my goal.

    I have a chart that is used to identify Defect trends in attribute data. It charts the count of defects over months/years and has lines for the mean + 1, +2, and +3 standard deviations. The chart also has a filter for two product categories (F & W). Currently I calculate the sigma’s manually every 6 months and apply to the chart through a separate table, excluding product type. So, if I filter it to one product the sigma’s still represent both products.

    Is there a way to have the Sigma data automatically update either monthly or every 6 months (Jan and July)? The mean + standard deviations are based on a 24-month period.

    Thank you in advance for any help you may provide.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    02-09-2022
    Location
    Wisconsin, USA
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    13

    Re: Charting Rolling Mean plus Standard Deviations of Attribute Data

    I am struggling to calculate the standard deviation of attribute data in a pivot table. Is this possible?

  3. #3
    Registered User
    Join Date
    02-09-2022
    Location
    Wisconsin, USA
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    13

    Re: Charting Rolling Mean plus Standard Deviations of Attribute Data

    I think I can accomplish this by using helper columns to get the standard deviations of each defect type in the date range of 1/1/2022 through 12/31/23. Unfortunately I keep getting errors.

    Any help would be greatly appreciated

    Not sure how to paste my formula, I keep getting an error stating "you are not allowed to post any kinds of links, images or videos until you post a few times"
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Charting Rolling Mean plus Standard Deviations of Attribute Data

    I think that you may be looking for the following formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Since you are using the 365 version you can probably just enter like any other formula.
    If you were using an earlier version you would need to press the Ctrl, Shift and Enter keys simultaneously to activate the formula.
    Note that since the values in column Q are constant for each defect, the standard deviations are all zero. As in the value for all cells in column Q corresponding to defect 12 is 35 so there is no variance.
    If you are not looking to get all zeros, then perhaps if we could see a couple of manually calculated standard deviations in column S along with explanations then we would be better able to help.
    Note that I suggest using structured references, i.e. [Month] instead of whole column references, i.e. F:F, as whole column references makes it very hard to troubleshoot a formula.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    02-09-2022
    Location
    Wisconsin, USA
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    13

    Re: Charting Rolling Mean plus Standard Deviations of Attribute Data

    Thank you JeteMC for your reply and your assistance.

    I should have mentioned that I am calculating the standard deviation of each defect monthly based on a 24 month period that changes every 6 months. From now until July, the data set is 1/1/2022 through 12/31/2023. In July, it will change to 7/1/2022 through 6/30/2024.

    I have attached the calculations I have been manually entering into my chart.

    Thanks again for helping me.

  6. #6
    Registered User
    Join Date
    02-09-2022
    Location
    Wisconsin, USA
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    13

    Re: Charting Rolling Mean plus Standard Deviations of Attribute Data

    Working with the formula, I was able to get numbers to calculate, however, they do not match with the original standard Deviation calculation. It is not calculating N as 24(months).

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Charting Rolling Mean plus Standard Deviations of Attribute Data

    I feel that it is easier to calculate the standard deviation from the pivot table.
    If you include a timeline slicer then you can change the data displayed in the pivot table to show the 24-month period desired.
    The formula to calculate standard deviation is: =STDEV.P(INDEX($B8:$V32,,MATCH(B1,$B6:$V6,0)))
    To illustrate the problem of calculating the standard deviation in column V on the Data sheet note that for March 2022 the formula will include the 5's for defect 6 five times instead of one.
    Let us know if you have any questions.

  8. #8
    Registered User
    Join Date
    02-09-2022
    Location
    Wisconsin, USA
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    13

    Re: Charting Rolling Mean plus Standard Deviations of Attribute Data

    I really appreciate you helping me with this issue. Thank you

    My end goal is to have an automated chart sliced by Defect, Year, Type that shows the count of defects (bar) a trend line, the mean plus 1 standard deviation (line), the mean plus 2 standard deviations (line), and the mean plus 3 standard deviations (line). The deviations are based on the 24 month data set and to change when filtered by Defect and or Type (Not year). This is illustrated in my first post, however the calculations are not automated and do not change when filtered by Type (F/W). in the first file, I use a second manually populated table which does not separate the deviations when the chart is filtered by Type (F/W). I thought perhaps this could be accomplished with one table and update accordingly, but I do not see the solution.

    I think this will work with the second table. I will work on this tomorrow and post an update.

    Thank you JeteMc.
    Last edited by Squidlo424; 02-26-2024 at 11:11 PM.

  9. #9
    Registered User
    Join Date
    02-09-2022
    Location
    Wisconsin, USA
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    13

    Re: Charting Rolling Mean plus Standard Deviations of Attribute Data

    This has been very helpful. I think I am down to the final obstacle.

    How do you update the source data when you click on a slicer filter? The PivotTable2 for the chart uses Table7 as the source data. Table7 uses formulas to calculate standard deviation and average from PivotTable3. The slicer is connected to both Pivot tables 2 & 3. When I filter the data with the slicer, Pivottable2 does not automatically update.

    Is there a way to do this without VBA?

    Attached is the file.

    Thank you again for helping.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    02-09-2022
    Location
    Wisconsin, USA
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    13

    Re: Charting Rolling Mean plus Standard Deviations of Attribute Data

    I used VBA.

    Thank you JeteMc for your help.

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Charting Rolling Mean plus Standard Deviations of Attribute Data

    Glad that you found a solution. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. need rolling standard deviations, annualised return etc
    By yipdog in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-13-2020, 03:26 AM
  2. [SOLVED] Combine standard deviations
    By abousetta in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 09-29-2015, 04:11 PM
  3. Creating standard deviations with complicated data set
    By mounstahman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-07-2015, 02:52 PM
  4. 4 Standard Deviations
    By NathanScott in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-03-2008, 04:52 AM
  5. Graph Standard Deviations
    By ed in forum Excel General
    Replies: 1
    Last Post: 08-03-2005, 05:05 PM
  6. Standard deviations in Excel
    By Fred Zack in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-14-2005, 09:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1