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

Alternative of SELECTEDVALUE DAX function

Guys,

 

We have a Employee Name Slicer in Power BI and were showing some counts based on slicer selection using SELECTEDVALUE function. We are migrating our entire steup to Prod environment on SSAS 2016 where SELECTEDVALUE is not compatible.

 

Also we tried with HASONEVALUE(), but I guess this can be used with only numeric or date type values. As discussed above we are having string type values as Employee Names.

 

Please suggest us an alternative that can be used in this place with String type values.

1 ACCEPTED SOLUTION

Accepted Solutions
vik0810 Member
Member

Re: Alternative of SELECTEDVALUE DAX function

HI,

 

SELECTEDVALUE is internally translated into following

 

IF ( HASONEVALUE ( Table[column] ), VALUES ( Table[column] ) )

 So just use the IF expansion. And it does work with string types also.

View solution in original post

3 REPLIES 3
vik0810 Member
Member

Re: Alternative of SELECTEDVALUE DAX function

HI,

 

SELECTEDVALUE is internally translated into following

 

IF ( HASONEVALUE ( Table[column] ), VALUES ( Table[column] ) )

 So just use the IF expansion. And it does work with string types also.

View solution in original post

Super User
Super User

Re: Alternative of SELECTEDVALUE DAX function

Hi @rupak_agarwal 

 

Try MAX()

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

rupak_agarwal Frequent Visitor
Frequent Visitor

Re: Alternative of SELECTEDVALUE DAX function

@vik0810 

 

Yeah, Thanks !!

I just accomplished this..


Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors (Last 30 Days)