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

Top Solution Authors