Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Check if certain value is selected in slicer

Hi All, in the Country slicer I have, I want to check if Singapore is selected. How should I find that by using calculated measures?   Regards, BK
  • Jihwan_Kim's avatar
    Jihwan_Kim
    5 years ago

    Hi, Anonymous 

    Thank you for your feedback.

    The reason is that because my sample does not have Select All in the slicer. So I added a condition hasonevalue in my measure. If I do not add this condition into my sample, and if I do not select anything, then the result will be still "Selected" in my sample.

    If your sample has Select All in the slicer, then please consider what happens if you do not select anything. In your sample, I assume, not selecting anything means the same thing as select all.

    If the above assumption is correct, then you can simply delete the hasonevalue condition, like below.

     

    Singapore Select or not =
    IF ( "Singapore" IN ALLSELECTED ( 'Table'[Country] ),
    "Selected",
    "Not Selected"
    )
     

    Hi, My name is Jihwan Kim.


    If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


    Linkedin: linkedin.com/in/jihwankim1975/

    Twitter: twitter.com/Jihwan_JHKIM