Forum Discussion
Anonymous
4 years agoNot applicable
Outliers in DAX
Hi, I'm working on a dataset that has 2 (or more) months worth of data. We mark the outliers manually in Excel by sorting the resolution hrs and then getting 5% of the total rows per month and then m...
- 4 years ago
Hi Anonymous ,
Try to create a new column like below:
outlier_test = var rank_asc = RANKX(FILTER('Table',EARLIER('Table'[Month Restored])='Table'[Month Restored]),'Table'[Restored Hours],,ASC,Dense) var rank_desc = RANKX(FILTER('Table',EARLIER('Table'[Month Restored])='Table'[Month Restored]),'Table'[Restored Hours],,DESC,Dense) var count_row = COUNTROWS(FILTER('Table',EARLIER('Table'[Month Restored])='Table'[Month Restored]))*0.05 return IF(rank_asc<=count_row||rank_desc<=count_row,"Outlier","Normal")
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lbendlin
Super User
4 years ago"I need a calculated column that will do this for me in PowerBI so that when I use the slicer for month, the marking for Outlier and Normal will automatically change as well. "
Calculated columns do not care about user interactions or slicers. Did you mean to say you need a measure?