Forum Discussion

M0n5ta09's avatar
M0n5ta09
Helper I
4 years ago
Solved

HELP - Standard Deviation

Hi everyone,
 
I've been trying for hours to calculate the Standard Deviation by month and by year based on _Faults per Day but getting nowhere.
I'm expecting the STDEV to be around 0.75 for 2017 and 0.65 for 2018.
Eventually I will be using the STDEV to calculate Lower and Upper Control Limits to visualise on a line chart against _Faults per Day.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Measures:
  • Faults = DISTINCTCOUNT('Full WO Extract'[FaultNum])     // Distinctcount of Fault Numbers
  • _Selected EOMonth = SELECTEDVALUE('Full WO Extract'[c_EOMonth])     // Number of Days for Month
  • _Faults per Day = DIVIDE( 'Full WO Extract'[Faults], 'Full WO Extract'[_Selected EOMonth])
  • _Mean - Faults per Day = DIVIDE(SUMX('Full WO Extract','Full WO Extract'[_Faults per Day]),12)
 Any help will be most appreciated. Thank you.
  • Can you try this measure:

    STDEV (LongTerm) = STDEV.S([_Faults per Day])
     

    Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

    Appreciate your Kudos !!!

    https://allure-analytics.com/

5 Replies

  • ALLUREAN's avatar
    ALLUREAN
    Solution Sage

    Can you try this measure:

    STDEV (LongTerm) = STDEV.S([_Faults per Day])
     

    Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

    Appreciate your Kudos !!!

    https://allure-analytics.com/

    • M0n5ta09's avatar
      M0n5ta09
      Helper I

      Many thanks ALLUREAN.

       

      Once I got the values into a column in the table opposed to using a measure, it worked perfectly.

  • M0n5ta09 , Try like

    calculate(Stddev.p(Table[_Mean - Faults per Day]), allexcept(table[Year]))

     

    Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

  • Thanks for your replies ALLUREAN and amitchandak 

     

    _Faults per Day and _Mean - Faults per Day are both measures, I modified each to;

    __STDEV = CALCULATE(STDEVX.P('EXTRACT','EXTRACT'[_Faults per Day]), ALLEXCEPT('DATES',DATES[Year]))

    and

    STDEV (LongTerm) = STDEVX.S('EXTRACT','EXTRACT'[_Faults per Day])

     

    but both produce a 0.00 result.

     

    YearMonthName_Selected EOMonth_DistinctWO_Faults per Day_Mean - Faults per Day
    2017Jan312126.840.57
    2017Feb281936.890.57
    2017Mar312177.000.58
    2017Apr302498.300.69
    2017May312297.390.62
    2017Jun302598.630.72
    2017Jul312718.740.73
    2017Aug312588.320.69
    2017Sep302247.470.62
    2017Oct312417.770.65
    2017Nov302127.070.59
    2017Dec312728.770.73

     

    I'm looking for the Standard Deviation for _Faults per Day. In Excel, STDEV for _Faults per Day returns 0.75.

     

    Thank you.