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
Is this what you're after?
Selected Document IDs =
VAR _DocsSelected = COUNTROWS ( ALLSELECTED ( MyTable[Document ID] ) )
VAR _DocsTotal = COUNTROWS ( ALL ( MyTable[Document ID] ) )
RETURN
IF (
_DocsSelected < _DocsTotal,
CONCATENATEX ( ALLSELECTED ( MyTable[Document ID] ), [Document ID], ", " ),
"All Document IDs selected"
)- Anonymous4 years agoNot applicable
Hi AlexisOlson Thanks for your reply! That would be a closer solution to the original problem but unfortunately it does not seem to work if there is an additional filter applied. For example, if i also apply a filter to show only one region (there are 2 regions, so let's say "HEP"), then selecting all the Document ID's does not show the text message "All Document IDs selected" but instead it just lists all the Document ID's. Is it possible to overcome this limitation?
- AlexisOlson4 years agoSuper User
It doesn't show "All Document IDs selected" because not all IDs are selected (only ones from one region).
It's possible to overcome this if you can figure out what exactly "All" means if it doesn't actually mean all. Maybe try changing the _DocsTotal variable to something like this?
VAR _DocsTotal = CALCULATE ( DISTINCTCOUNT ( MyTable[Document ID] ), ALL ( MyTable[Document ID] ) )