cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Marcos1980
Regular Visitor

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
Marcos1980
Regular Visitor

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.

 

Marcos1980
Regular Visitor

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.

@Marcos1980 , 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. 😀

Marcos1980
Regular Visitor

Marcos1980_0-1680390396736.png

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

@Marcos1980 , 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

@Marcos1980 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

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors