Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
snifer
Post Patron
Post Patron

selected value seams to not work properly

I used before and now it seems to not work I attach the powerbi file

 

https://www.dropbox.com/s/7pw7fkn7u0w3xef/TEST.pbix?dl=0

 

 

if slicer it is selected the display 1 otherwise 0

 

 

before was working why not? I do miss something?

 

1 ACCEPTED SOLUTION
MartynRamsden
Solution Sage
Solution Sage

Hi @snifer 

 

You only have one value ("local") in the column used for your slicer. As such, SELECTEDVALUE will always return "local", whether your slicer is selected or not. Resulting in your measure always returning 1.

 

If you add another record to your table, your measure will work as expected.

If you will only ever have one record in that table, you could use the ISFILTERED function instead.

 

Best regards,
Martyn


If I answered your question, please help others by accepting it as a solution.

View solution in original post

1 REPLY 1
MartynRamsden
Solution Sage
Solution Sage

Hi @snifer 

 

You only have one value ("local") in the column used for your slicer. As such, SELECTEDVALUE will always return "local", whether your slicer is selected or not. Resulting in your measure always returning 1.

 

If you add another record to your table, your measure will work as expected.

If you will only ever have one record in that table, you could use the ISFILTERED function instead.

 

Best regards,
Martyn


If I answered your question, please help others by accepting it as a solution.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Power BI Header Change

Power BI Header Update

Read about the exciting updates for the Power BI forum.

Top Solution Authors