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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

SELECTEDVALUE function doesn't recognized

Hi to all,

 

I am trying to create a new measure by using a selected value from a slicer. First i created a demo by deploying the model to local sql server which has supported compatibility level 1200 and can use SELECTEDVALUE function in power bi dax query. But after deploy the model to sql server in the server which has supported compatibility level 1103 and get data in live connection mode couldn't see SELECTEDVALUE. So is it there a way to fix this situation? Thanks for any help.

1 ACCEPTED SOLUTION
Stachu
Community Champion
Community Champion

you can use the IF + HASONEVALUE combination, as explained here
https://www.sqlbi.com/articles/using-the-selectedvalue-function-in-dax/

IF ( HASONEVALUE ( Table[column] ), VALUES ( Table[column] ), "default value" )

 



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

2 REPLIES 2
Stachu
Community Champion
Community Champion

you can use the IF + HASONEVALUE combination, as explained here
https://www.sqlbi.com/articles/using-the-selectedvalue-function-in-dax/

IF ( HASONEVALUE ( Table[column] ), VALUES ( Table[column] ), "default value" )

 



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Anonymous
Not applicable

Thanks so much for helping. 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.