Outlier Detection Issue

Hi all,

I followed Sam’s Outlier Detection lesson -replacing Total Sales with Sales Ranking- but I can’t get the desired results.
As you may see, Outliers should be restricted to the red box area according to my Outlier Detection Logic table.
Tried different combinations with && and || in measures with no success.
Could anyone point out my logic mistake here?

Sample Report.pbix (25.1 MB)

Hi @Thimios,

Give this a go.

Outlier Ranking v2 = 
CALCULATE( [Sales Item Ranking v1],
	FILTER( VALUES( 'Sales Items'[Description] ), 
		COUNTROWS(
			FILTER( 'Outlier Detection Logic', 
				[Sales Item Ranking v1] >= MAX('Outlier Detection Logic'[Sales Item Ranking v1 Min]) &&
				[Sales Item Ranking v1] <= MAX('Outlier Detection Logic'[Sales Item Ranking v1 Max]) &&
                [Profits Margin] >= MAX('Outlier Detection Logic'[Profits Margin Min] ))) > 0 ))

Note that you’ll have to update the measure below as well

Ranking Grouping = 
IF( SELECTEDVALUE( 'Outlier Detection Logic'[Grouping] ) = "Outlier",
	[Outlier Ranking v2],
		[Non-Outlier Ranking] )

I hope this is helpful.

1 Like

Thank you @Melissa, works perfectly!
I strive to understand though, which table ‘Outlier Detection Logic’ row the FILTER function in Outlier Ranking v2 measure is revoking. :dizzy_face: