Forum Discussion

PhilipH's avatar
PhilipH
New Member
4 years ago
Solved

StdDev By Subgroups

Hi guys,   I am hoping you can help as I am going in circles.   I am looking to calculate the stdev for a [data] column, grouped according to a [VarFtrID] column and then a [Sequence] column.   ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  PhilipH ,

    I created some data:

    Here are the steps you can follow:

    1. Create calculated column.

    The standard deviation of the entire population

    the standard deviation of the entire population =
    CALCULATE(STDEV.P('Table'[data]),FILTER(ALL('Table'),'Table'[VarFtrID]=EARLIER('Table'[VarFtrID])&&'Table'[Sequence]=EARLIER('Table'[Sequence])))

    Refer to :

    STDEV.P function (DAX) - DAX | Microsoft Docs

     

    The standard deviation of a sample population

    the standard deviation of a sample population. = CALCULATE(STDEV.S('Table'[data]),FILTER(ALL('Table'),'Table'[VarFtrID]=EARLIER('Table'[VarFtrID])&&'Table'[Sequence]=EARLIER('Table'[Sequence])))

    Refer to :

    STDEV.S function (DAX) - DAX | Microsoft Docs

     

    2. Result:

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly