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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
finance_124
New Member

Dax Code to identify Outliers

Long time reader, first time poster...

 

I'm having a difficult time figuring out the DAX formula to identify outliers. I can easily do this in Excel but just can't figure out the needed DAX code. Long story short, I'm trying to identify outliers based on where the Minutes column is greater than the Upper Bound for that given Code(Code column). (E.G. Code 101 is only looking for it's Minutes that are greater than it's Upper Bound). FYI...I'm using the IQR method to identify outliers. Below is a mock up in excel:

finance_124_0-1650419627685.png

Can anyone help me solve this one?

4 REPLIES 4
tamerj1
Super User
Super User

@finance_124 

Sorry I thought this is a source data table. However, it should also work if you create a measure the same way. 
IF ( SUM ( Table[Minutes] ) > [Upper Bound], "Outlier", "Normal" )

Whitewater100
Solution Sage
Solution Sage

Hello:

You can try a calculated column in your table.

Outlier = IF(Table[Minutes] > Table[Upperbound], "Outlier", "Normal")

 

I hope this works out for you.

tamerj1
Super User
Super User

Hi @finance_124 

you can create new column 

IF ( Table[Minutes] > Table[Upper Bound], "Outlier", "Normal" )

Thanks @tamerj1. I thought it was as easy as that but it's showing them all as normal.

FYI..I've inherited this existing Power BI dashboard and they want some enhancements to it.

 

Now, would it be because a measure was created for Avg, 25th Percentile, 75th Percentile, IQR, Lower Bound, and UpperBound versus creating a new column for those? There are also some filters that the user could apply on the front page(Account and Date), I've included those two fields to show what they could filter on. Is there a way to do an outlier formula in a measure?

 

Please note: All yellow columns are Measures.

 

finance_124_0-1650467630907.png

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.