Forum Discussion
smileamile2
1 year agoResolver I
Slicer DAX
Error
- 1 year ago
Solution implemented was using default functionality of the new slicer visual.
smileamile2
1 year agoResolver I
x
Anonymous
1 year agoNot applicable
Thanks for danextian and Ashish_Mathur's concern about this issue.
Hi, smileamile2
Please try the following DAX:
Filter =
VAR _VALUES =
UNION ( VALUES ( StatusOrState[Value] ), { BLANK () } )
VAR _VALUES2 =
VALUES ( StatusOrState[Value] )
RETURN
IF (
NOT ( ISFILTERED ( StatusOrState[Value] ) ),
CALCULATE (
COUNTROWS ( 'Table' ),
KEEPFILTERS ( 'Table'[Status] IN _VALUES || 'Table'[State] IN _VALUES )
),
IF (
COUNTROWS ( _VALUES2 ) = 1,
CALCULATE (
COUNTROWS ( 'Table' ),
KEEPFILTERS ( 'Table'[Status] IN _VALUES2 || 'Table'[State] IN _VALUES2 )
),
CALCULATE (
COUNTROWS ( 'Table' ),
KEEPFILTERS ( 'Table'[Status] IN _VALUES2 && 'Table'[State] IN _VALUES2 )
)
)
)
Output:
I have attached the pbix file for that example below, I hope it helps!
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.