Forum Discussion
Custom messages based on slicer selections
- 4 years ago
Hi Anonymous ,
Can you try this?
Filter Selected =IF (CALCULATE (HASONEVALUE ( MyTable[Document ID] ),ALLSELECTED ( MyTable ))= TRUE (),CONCATENATEX ( VALUES ( MyTable[Document ID] ) , [Document ID] , ",") ,"Multiple Document ID's selected")Thank you
Hi Anonymous ,
Use following DAX with IF function.
Hi AUDISU Thank you for your reply! I have tried the measure and it works when one or multiple Document ID's are selected in the slicer list. However, when no Document ID's or "Select all" option is chosen, there is a big list of all the Document IDs. Is it possible to show a custom text message instead? Such as, "All Document ID's selected"?
I have made some progress but i do not know how to change:
1. The value "1" to the currently selected Document ID
2. The value "2" to a text that says "Multiple Document ID's selected".
Is this possible?
Filter Selected =
IF (
CALCULATE (
HASONEVALUE ( MyTable[Document ID] ),
ALLSELECTED ( MyTable )
)
= TRUE (),
1,
2
)
- AUDISU4 years ago
Resolver III
Hi Anonymous ,
Can you try this?
Filter Selected =IF (CALCULATE (HASONEVALUE ( MyTable[Document ID] ),ALLSELECTED ( MyTable ))= TRUE (),CONCATENATEX ( VALUES ( MyTable[Document ID] ) , [Document ID] , ",") ,"Multiple Document ID's selected")Thank you- Anonymous4 years agoNot applicable
AUDISU Thanks for the reply! It works. I have also done some research and came up with this alternative working version. I'm not sure if it's correct or if it will give any unforeseen problems?
Filter Selected = IF ( CALCULATE ( HASONEVALUE ( MyTable[Document ID] ), ALLSELECTED ( MyTable ) ) = TRUE (), SELECTEDVALUE ( MyTable[Document ID] ), "Multiple Document ID's selected" )