Forum Discussion
Comparing values in the same column
- Anonymous8 years ago
Hey stefanycheck
I can't see your data but I have an idea for you. You easily can go in the query editor and add an index column. This will sequentially rank your data and we can use these indexes in a calculated column. Something like:
OutlierColumn = VAR CurrentIndex = SELECTEDVALUE(Table[Index]) RETURN IF( ABS( CALCULATE( MAX(Table[Temperature]), FILTER( ALLSELECTED(Table), TableIndex = CurrentIndex ) ) - CALCULATE( MAX(Table[Temperature]), FILTER( ALLSELECTED(Table), TableIndex = CurrentIndex - 1 ) )) >= 10, 0, 1 )If I wrote that correctly, you are grabbing the current temperature and the temperature of the row above it. You subtract the two and take the absolute value. If the absolute value is greater than or equal to 10, the new column is set to 0. If it is within 10, it is given a 1. You can then bring this new column into the Visual level filters and filter for where OutlierColumn = 1.
Hope this helps!
Parker
Hey stefanycheck
I can't see your data but I have an idea for you. You easily can go in the query editor and add an index column. This will sequentially rank your data and we can use these indexes in a calculated column. Something like:
OutlierColumn =
VAR CurrentIndex = SELECTEDVALUE(Table[Index])
RETURN
IF(
ABS(
CALCULATE(
MAX(Table[Temperature]),
FILTER(
ALLSELECTED(Table),
TableIndex = CurrentIndex
)
) -
CALCULATE(
MAX(Table[Temperature]),
FILTER(
ALLSELECTED(Table),
TableIndex = CurrentIndex - 1
)
)) >= 10,
0,
1
)If I wrote that correctly, you are grabbing the current temperature and the temperature of the row above it. You subtract the two and take the absolute value. If the absolute value is greater than or equal to 10, the new column is set to 0. If it is within 10, it is given a 1. You can then bring this new column into the Visual level filters and filter for where OutlierColumn = 1.
Hope this helps!
Parker