Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Filter Outliers based on measures

I have two tables, as pictured below.  The first table indicates a specific line, the "count of product" helps me identify if I have enough data available to accurately measure standard deviation, etc.  The Columns for BtlNkAsmt, StdDev, YMin, and YMax, are all measurements. BtlNkAsmt in this table is showing an average for the specific resource in question.

 

The second table is showing the individual product codes that fall under my "Resource Description" from the first table.  My bottleneck in this case is looking at the product code.  The first two rows and the last row of product codes identify a percentage that falls outside of the YMin and YMax range from the first table.

 

What I want, is for this second table to ONLY show me, the percentages that fall outside of these ranges from the previous tables.  I've searched several existing discussions on this subject and they all appear to be based on breaking down your ranges by some "finite" number. Using a slicer requires me to manually enter the Ymin and Ymax everytime and it does not automatically adjust.  I even tried to replicate the following measure but it failed to filter the data and assigned a "1" to every product code, meaning it's not measuring what I want correctly either.

 

Measure Filter1 =
VAR MinValue = [YMin]
VAR MaxValue = [YMax]
Var CurrentMeasureValue = [BtlNkAsmt]
Return
If(
    CurrentMeasureValue <= MinValue && CurrentMeasureValue >= MaxValue,
    1,
    0
)
 

The data here is unique, and is pulled from a data table containing over 4000 rows.