The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
Solved! Go to Solution.
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
Hi, @Anonymous
I am not sure what is your desired outcome, but I assume you want to see it in the card visualization.
Please check the below picture and the sample pbix file's link down 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
Hi @Jihwan_Kim , thanks for the reply. When I change to Select All in the slicer, the measure will display "Not Selected" instead
Regards,
BK
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")