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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

How to identify outliers values in DAX? Follow example bellow

 

CodPriceOutlier
300-0001-1015000,00Yes
300-0001-101,98no
300-0001-102,00no
300-0001-101,98no
300-0002-111500no
300-0002-111500no
300-0002-110,01yes

 

I need a DAX that show the outlier for each Cod number as example below. Second step is to show the status of the Outlier with "Yes" or "no". Thanks!

7 REPLIES 7
Anonymous
Not applicable

Marcos1980_0-1680400178193.png

here is a real example of my database, here we have two outliers, one with 216k and other 28k, both are outliers.

 

Anonymous
Not applicable

First of all, I'm glad you were so quick to help me.

Actually it would be the standard deviation I need. I put a few examples to facilitate understanding. To exemplify my need, imagine that in thousands of items, some items have very high or very low prices, but not all. So I need to find the standard deviation for the cases and delete them from the database.

@Anonymous , sorry, I am not sure what is your criteria for deviation, how do you define or measure the ourlier.

Maybe wait for other people to help. 😀

Anonymous
Not applicable

Marcos1980_0-1680390396736.png

Sorry! Indeed, the columns came together. I attached an image for better viewing. please someone help me.

@Anonymous , seems you want to find the min and max of price, please see below measure and pbix file attached as well.

_outlier =
VAR _outlier_min = CALCULATE(MIN('Table'[Price]),all('Table'))
VAR _outlier_max = CALCULATE(MAX('Table'[Price]),all('Table'))
RETURN
IF(
    CALCULATE(SUM('Table'[Price])) = _outlier_min || CALCULATE(SUM('Table'[Price])) = _outlier_max,
    "Yes",
    "No"
)

 

20230402.pbix

wangbt89_0-1680394386066.png

 

Walter_W2022
Resolver II
Resolver II

@Anonymous not sure what is your criteria for the outlier of Cod number, is it the length of Cod column or min/max price for Cod column, also for the example data, there is no vertical line or space to seperate Cod and Price column, it is no possible to identify the data in both columns

Anonymous
Not applicable

Hello! In the "cod."column I have two examples of the alot others: 300-0001-10 and 300-002-11. these two codes represent products with their respective prices and within each code I need to identify and show the Outliers. As the image bellow.

 

Marcos1980_0-1680522724996.png

 

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Top Solution Authors