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.
Anonymous
4 years agoNot applicable
Ah, essentially, on my sample, the column Outlier should be changing and recalculated to show outlier and normal depending on the month that the user will select.
Sorry, just getting back into pbi and i'm a bit lost.