cancel
Showing results for
Did you mean:

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Anonymous
Not applicable

## Standard deviation of a calculated measure

Hi Experts

How would you go about calculating the standard deviation of a measure. I have read you can do the following but I do not have a clue on how to tackle this...

Possible solution but how do you do the following steps.

using something like SUMMARIZE, etc. Include your measure in the table initially or use an ADDCOLUMNS statement to add your measure. Then you can use that temporary table to calculate your standard deviation.

1 ACCEPTED SOLUTION
Super User

Hi,

In the last column of the matrix, i have computed the Standard Deviation.  You may download the PBI file from here.

Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
13 REPLIES 13
Resident Rockstar

Fairly straightforward as a DAX measure:

`STD DEV = STDEVX.S(OrigTable, [Measure1])`

be sure to use STDEVX.S and STDEVX.P as appropriate.

Anonymous
Not applicable

Thanks for the feedback....notnsure if that'll work

My measure is =calculate(countrows(table[column name]="blah")

When I add this to a matrix table with yrs across the top column and column name as above in the rows and the measure in the values part..

I get

Column Name       2003 2004 2006 2007 2008 2009 2010 2011

Death                          4       8      18     18     20     12    11    15

I want to find the standard deviation of those values....

The table can be filtered with the filters on the dashboard......

Super User

Hi,

I am surprised that your measure is working.  The input to the COUNTROWS() function is a Table (not a filter condition like yours).  Share some data (in a format that can be pasted in an Excel file).  Also, do you want the Standard Deviation to appear in a column after the year 2011?

Regards,
Ashish Mathur
http://www.ashishmathur.com
Anonymous
Not applicable

Hi Ash

Here is a link to test box file...

https://www.dropbox.com/s/1lxk3ffznmq1s6v/Test_.pbix?dl=0

I am trying to work out the standard deviation of the table sshowing death revised and unrevised.. but in particular the revised row both in the table and also to use measure in a card.

Super User

Hi,

In the last column of the matrix, i have computed the Standard Deviation.  You may download the PBI file from here.

Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
New Member

Hi Ashish, I am also seeking solution for similiar kind of problem , if possible could you please allow me to download the PBIX file

Super User

Hi,

I do not have the file.  Share some data to work with, explain the question and show the desired result.

Regards,
Ashish Mathur
http://www.ashishmathur.com
Anonymous
Not applicable

Hi Ash

quick question...how does the formula (measure work) as i would like to learn...and also how could i change the measure to bring it into a card and only show the 6.5 STD DEV value...

Measure 1 = countrows(sheet1)

`Measure 2 = if(HASONEVALUE(Sheet1[ImpantationYear1]),[Measure],STDEVX.P(SUMMARIZE(VALUES(Sheet1[ImpantationYear1]),Sheet1[ImpantationYear1],"ABCD",[Measure]),[ABCD]))`

thanks

Super User

Hi,

Are my answers correct?  Create a card visual and drag measure2 to the card visual.  Apply a filter on that visual with the criteria on the OutcomeType field as Revised.  Please read up on the SUMMARIZE function (Google search) and if you still face problems with understanding, post back.  I will clarify.

Regards,
Ashish Mathur
http://www.ashishmathur.com
Anonymous
Not applicable

thanks, Ash

Super User

You are welcome.

Regards,
Ashish Mathur
http://www.ashishmathur.com
Anonymous
Not applicable

hi

i have added a part 2 to the original questin if you wanted to cast your eye over it...

https://community.powerbi.com/t5/Desktop/Standard-Deviation-Part-2/m-p/715713#M345396

Anonymous
Not applicable

got the file thanks