- Forums
- Get Help with Power BI
- Desktop
- Service
- Report Server
- Power Query
- Mobile Apps
- Developer
- DAX Commands and Tips
- Let's Talk Data
- Custom Visuals Development Discussion
- Community Support
- Community Information
- Community Accounts & Registration
- Using the Community
- Community Feedback
- Training and Consulting
- Dashboard in a Day
- EdX Specific Training Discussion Forum

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Microsoft Power BI Community
- Forums
- Get Help with Power BI
- Desktop
- Standard deviation of a calculated measure

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

Route217

Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-14-2019
02:28 PM

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.

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

Ashish_Mathur

Super User

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-15-2019
02:13 AM

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.

11 REPLIES 11

Cmcmahan

New Contributor

Re: Standard deviation of a calculated measure

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-14-2019
02:49 PM

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

Re: Standard deviation of a calculated measure

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-14-2019
02:59 PM

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......

Ashish_Mathur

Super User

Re: Standard deviation of a calculated measure

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-14-2019
08:11 PM

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

Re: Standard deviation of a calculated measure

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-15-2019
01:42 AM

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.

Ashish_Mathur

Super User

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-15-2019
02:13 AM

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.

Route217

Member

Re: Standard deviation of a calculated measure

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-15-2019
02:21 AM

got the file thanks

Route217

Member

Re: Standard deviation of a calculated measure

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-15-2019
02:26 AM

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

Ashish_Mathur

Super User

Re: Standard deviation of a calculated measure

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-15-2019
02:38 AM

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.

Route217

Member

Re: Standard deviation of a calculated measure

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-15-2019
03:25 AM

thanks, Ash

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