Forum Discussion
Card Visual (DAX) with two Slicers
- 3 years ago
If I understood right, You need sth like this using SWITCH to handle different cases:
SWITCH ( TRUE (), NOT ( ISFILTERED ( 'Table'[Subscription] ) ) && NOT ( ISFILTERED ( 'Table'[CustomerName] ) ), "All Customers", HASONEVALUE ( 'Table'[Subscription] ) && NOT ( ISFILTERED ( 'Table'[CustomerName] ) ), VALUES ( 'Table'[CustomerName] ), HASONEVALUE ( 'Table'[CustomerName] ) && NOT ( ISFILTERED ( 'Table'[Subscription] ) ), VALUES ( 'Table'[CustomerName] ), ISFILTERED ( 'Table'[Subscription] ) && HASONEVALUE ( 'Table'[Subscription] ) = FALSE (), CONCATENATEX ( VALUES ( 'Table'[CustomerName] ), 'Table'[CustomerName], ", " ), ISFILTERED ( 'Table'[CustomerName] ) && HASONEVALUE ( 'Table'[CustomerName] ) = FALSE (), CONCATENATEX ( VALUES ( 'Table'[CustomerName] ), 'Table'[CustomerName], ", " ), CONCATENATEX ( VALUES ( 'Table'[CustomerName] ), 'Table'[CustomerName], ", " ) )Now the logic is clear. Based on your need you can edit it easily.
It helped? Mark it as an accepted solution.
Regards,
Loran
Hi MohammadLoran25,
Thank you for your help here, that worked for the Subscription slicer. The issue is I still need the Customer name slicer to work on the card. Do you know if that can be done?
To answer your question, yes the customer name and subscription is all in one table.
Cheers
Ian.
If I understood right, You need sth like this using SWITCH to handle different cases:
SWITCH (
TRUE (),
NOT ( ISFILTERED ( 'Table'[Subscription] ) )
&& NOT ( ISFILTERED ( 'Table'[CustomerName] ) ), "All Customers",
HASONEVALUE ( 'Table'[Subscription] )
&& NOT ( ISFILTERED ( 'Table'[CustomerName] ) ), VALUES ( 'Table'[CustomerName] ),
HASONEVALUE ( 'Table'[CustomerName] )
&& NOT ( ISFILTERED ( 'Table'[Subscription] ) ), VALUES ( 'Table'[CustomerName] ),
ISFILTERED ( 'Table'[Subscription] )
&& HASONEVALUE ( 'Table'[Subscription] ) = FALSE (), CONCATENATEX ( VALUES ( 'Table'[CustomerName] ), 'Table'[CustomerName], ", " ),
ISFILTERED ( 'Table'[CustomerName] )
&& HASONEVALUE ( 'Table'[CustomerName] ) = FALSE (), CONCATENATEX ( VALUES ( 'Table'[CustomerName] ), 'Table'[CustomerName], ", " ),
CONCATENATEX ( VALUES ( 'Table'[CustomerName] ), 'Table'[CustomerName], ", " )
)
Now the logic is clear. Based on your need you can edit it easily.
It helped? Mark it as an accepted solution.
Regards,
Loran
- Nerf_Herder3 years agoFrequent Visitor
Wow! Honestly that's amazing! I can't thank you enough. That worked exactly as I want it to!
Thank you!!
Ian.