Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Efsteps
Frequent Visitor

Help Making an advanced standard deviation with filter based on a column

Hi everyone, i need help with this problem:

Look at this table:

[Sales]

 

Click Here 

 

And from that table i made this visual (The Standard Deviation value is 65.68)

 

Sales.png

The Standard Deviation that I need is not showing in this visual because is taking the values of [Average Sales Per day] and I need that takes the values like the table of the image #2 to take this Standard Deviation Result (114.39):

 

3.png

Thank You very much for reading.

1 ACCEPTED SOLUTION

Thanks, that helps. See solution below:

stdevm = CALCULATE(STDEVX.P(VALUES(Sales[Seller Name]);CALCULATE(sum(Sales[Average Sales per Day]))))

as seen here:

stdev3.png 

 

See modified Power BI file here

 

If this is what you are looking for, please mark as solution. Kudo's appreciated.

 

Kind regards,

 

Steve. 

View solution in original post

6 REPLIES 6
mahoneypat
Employee
Employee

You need to use the STDEVX.P() function.  Please try this approach 

 

Std Complex = STDEVX.P(VALUES(Table[Seller Name]), CALCULATE(Average(Table[Avg Sales Per Day])))
 
Where Table is your table name and the column (not measure) is in the Average().  Having the Calculate is required (or you can just use your measure that is the average of that column instead).
 

If this works for you, please mark it as solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Thanks for the response, in tried your recommendation but gave me another value the problem still look:
The right value is 114.40  in this case.

Anotación 2020-05-30 105850.png

 

Can you share a Power BI file with a sample of your data so we can work with this?

Sure, clic here:

 

Power BI Data 

Thanks, that helps. See solution below:

stdevm = CALCULATE(STDEVX.P(VALUES(Sales[Seller Name]);CALCULATE(sum(Sales[Average Sales per Day]))))

as seen here:

stdev3.png 

 

See modified Power BI file here

 

If this is what you are looking for, please mark as solution. Kudo's appreciated.

 

Kind regards,

 

Steve. 

Excelent!

 

Thank you both. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.