Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Standard Deviation

Hi All, My Fact has ItemKey,CompanyKey,MonthKey,Revenue is there anway to calculate 'StDev.P' with resepect to itemnumbers from Item Dimension and MonthNumbers from Date Dimension. where revenue f...
  • OwenAuger's avatar
    OwenAuger
    9 years ago

    Anonymous

     

    I would personally prefer to do this with a measure rather than creating any intermediate tables:

    Something like:

    =
    STDEVX.P (
        SUMMARIZE ( 'Fact', DimItem[ItemNumber], DimDate[MonthNumber] ),
        CALCULATE ( SUM ( 'Fact'[Revenue] ) )
    )

    This should produce the same result as Eric_Zhang had above.