cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Route217 Member
Member

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

Accepted Solutions
Super User
Super User

Re: Standard deviation of a calculated measure

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.

Untitled.png 

11 REPLIES 11
Cmcmahan New Contributor
New Contributor

Re: Standard deviation of a calculated measure

Fairly straightforward as a DAX measure:

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

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

Route217 Member
Member

Re: Standard deviation of a calculated measure

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
Super User

Re: Standard deviation of a calculated measure

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?

Route217 Member
Member

Re: Standard deviation of a calculated measure

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
Super User

Re: Standard deviation of a calculated measure

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.

Untitled.png 

Route217 Member
Member

Re: Standard deviation of a calculated measure

got the file thanks

Route217 Member
Member

Re: Standard deviation of a calculated measure

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
Super User

Re: Standard deviation of a calculated measure

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.

Untitled.png

Route217 Member
Member

Re: Standard deviation of a calculated measure

thanks, Ash

 

I was not doubting your answer...thanks once again.