Forum Discussion
numerical filter excluding range
- 5 years ago
Hi wbart ,
I agree with amitchandak idea, but it seems that there are still some small problems in the formula. I did the following test:
M = VAR _max = MAXX ( ALLSELECTED ( Slicer1 ), Slicer1[filter1] ) VAR _min = MINX ( ALLSELECTED ( Slicer1 ), Slicer1[filter1] ) VAR _max1 = MAXX ( ALLSELECTED ( Slicer2 ), Slicer2[filter2] ) VAR _min1 = MINX ( ALLSELECTED ( Slicer2 ), Slicer2[filter2] ) RETURN CALCULATE ( SUM ( 'Table'[Data] ), FILTER ( 'Table', ( MAX ( 'Table'[Data] ) <= _max && MAX ( 'Table'[Data] ) >= _min ) || ( MAX ( 'Table'[Data] ) <= _max1 && MAX ( 'Table'[Data] ) >= _min1 ) ) )
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi wbart ,
I agree with amitchandak idea, but it seems that there are still some small problems in the formula. I did the following test:
M =
VAR _max =
MAXX ( ALLSELECTED ( Slicer1 ), Slicer1[filter1] )
VAR _min =
MINX ( ALLSELECTED ( Slicer1 ), Slicer1[filter1] )
VAR _max1 =
MAXX ( ALLSELECTED ( Slicer2 ), Slicer2[filter2] )
VAR _min1 =
MINX ( ALLSELECTED ( Slicer2 ), Slicer2[filter2] )
RETURN
CALCULATE (
SUM ( 'Table'[Data] ),
FILTER (
'Table',
(
MAX ( 'Table'[Data] ) <= _max
&& MAX ( 'Table'[Data] ) >= _min
)
|| (
MAX ( 'Table'[Data] ) <= _max1
&& MAX ( 'Table'[Data] ) >= _min1
)
)
)
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.