Forum Discussion
Filtering with an OR condition and user-defined thresholds
- 1 year ago
Hi tzuchiao
You can use what-if parameters as the values to feed to the filter. You can modify its calcualted table formula to reference the max consistent/deviation value so the series of numbers becomes dynamic. This feature generates a series of numbers and which slicer allows for a single value selection using a slider. Please see the attached sample pbix.
You can then use a measure to visually filter your table using an OR logic.
Consistent Deviation Filter = // This measure calculates the count of rows in 'Table' based on a filter condition. CALCULATE ( COUNTROWS ( 'Table' ), // Counts the rows in 'Table' KEEPFILTERS ( FILTER ( // Applies a filter on 'Table'[Consistent] and 'Table'[Deviation] columns ALL ( 'Table'[Consistent], 'Table'[Deviation] ), // Filters rows where 'Consistent' is greater than or equal to [ConsistentFilter Value] // OR 'Deviation' is less than or equal to [DeviationFilter Value] 'Table'[Consistent] >= [ConsistentFilter Value] || 'Table'[Deviation] <= [DeviationFilter Value] ) ) )
Hi tzuchiao
You can use what-if parameters as the values to feed to the filter. You can modify its calcualted table formula to reference the max consistent/deviation value so the series of numbers becomes dynamic. This feature generates a series of numbers and which slicer allows for a single value selection using a slider. Please see the attached sample pbix.
You can then use a measure to visually filter your table using an OR logic.
Consistent Deviation Filter =
// This measure calculates the count of rows in 'Table' based on a filter condition.
CALCULATE (
COUNTROWS ( 'Table' ),
// Counts the rows in 'Table'
KEEPFILTERS (
FILTER (
// Applies a filter on 'Table'[Consistent] and 'Table'[Deviation] columns
ALL (
'Table'[Consistent],
'Table'[Deviation]
),
// Filters rows where 'Consistent' is greater than or equal to [ConsistentFilter Value]
// OR 'Deviation' is less than or equal to [DeviationFilter Value]
'Table'[Consistent] >= [ConsistentFilter Value]
|| 'Table'[Deviation] <= [DeviationFilter Value]
)
)
)