Forum Discussion

mrothschild's avatar
mrothschild
Continued Contributor
7 years ago
Solved

calculating standard deviations from Matrix visual

PBIX file is here: https://www.dropbox.com/s/uasonb98zmz41xw/ATV%2C%20growth%20and%20indexing.pbix?dl=0

 

I have a matrix visual that appears as follows, except for the StdDev column on the right.  That column is what I'm trying to calculate and is the desired output - I don't need it in the Matrix visual, but do need the values associated with Low/Mid/High rows, and need it to be dynamic, as the Matrix visual will eventually be filtered by slicers.  The StdDev column is the Standard Deviation of the annual % change in the upper table, calculated from the lower table.

 

Thanks!

 

 20082009201020112012201320142015201620172018StdDev
Low$624$990$914$812$926$914$893$926$846$847$76220.8%
Mid$512$841$771$685$780$779$808$819$751$739$64522.7%
High$454$709$670$582$645$651$699$696$628$609$40423.0%

 

 20082009201020112012201320142015201620172018StdDev
Low 58.6%(7.7%)(11.1%)14.0%(1.3%)(2.3%)3.6%(8.6%)0.2%(10.1%)20.8%
Mid 64.4%(8.3%)(11.2%)13.8%(0.1%)3.8%1.3%(8.3%)(1.6%)(12.7%)22.7%
High 56.2%(5.4%)(13.2%)10.9%0.8%7.4%(0.4%)(9.8%)(3.1%)(33.7%)23.0%
  • Hi mrothschild,

     

    Please try this measure.

    Measure =
    VAR a =
        SELECTCOLUMNS ( 'Data', "value", [Value] )
    RETURN
        STDEVX.S (
            SUMMARIZE ( 'Data', 'Calendar'[Year], Data[Attribute] ),
            IF ( [Annual % change] <= 1, [Annual % change], BLANK () )
        )
    

    calculating-standard-deviations-from-Matrix-visual

     

    BTW, DO NOT share anything confidential here.

     

    Best Regards,

2 Replies

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi mrothschild,

     

    Please try this measure.

    Measure =
    VAR a =
        SELECTCOLUMNS ( 'Data', "value", [Value] )
    RETURN
        STDEVX.S (
            SUMMARIZE ( 'Data', 'Calendar'[Year], Data[Attribute] ),
            IF ( [Annual % change] <= 1, [Annual % change], BLANK () )
        )
    

    calculating-standard-deviations-from-Matrix-visual

     

    BTW, DO NOT share anything confidential here.

     

    Best Regards,