cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ydundar
Frequent Visitor

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 🙂

Proud to be a Super User!

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 🙂

Proud to be a Super User!

View solution in original post

ydundar
Frequent Visitor

Thanks so much for helping. 

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!