Forum Discussion
Check if certain value is selected in slicer
- 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
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.
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
this doesn't work, this is stupid, no matter which value you have selected it returns true. This is not a solution.
The solution is IF("Singapore" IN VALUES('Table'[Country]), "SELECTED", "NOT SELECTED")