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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

0

SELECTEDVALUE and HASONEVALUE bug

There is a bug in the current implementation of SELECTEDVALUE and HASONEVALUE functions.

 

Under certain conditions, you get the following error: "MdxScript(Model) (4, 36) Calculation error in measure 'One Side'[Hasonevalue Key]: A table of multiple values was supplied where a single value was expected."

 

I reproduced the error in a very simplistic file: Selectedvalue.pbix

 

Important note: if you change cross filter direction from Both to Single, there will be no error.

Status: Delivered
Comments
v-jiascu-msft
Employee

Hi @Daniil,

 

I have reported this issue to Product Team: CRI 51815465. I will post updates here.

 

Best Regards!

Dale

Vicky_Song
Impactful Individual
Status changed to: Accepted
 
v-jiascu-msft
Employee

Hi @Daniil,

 

I got the response from the Product Team.

 

This issue will be fixed in the January 2018 release.

As a workaround, we suggest to use the following pattern: using MAX instead of VALUES: * if(HASONEVALUE(OneSide[ID]),MAX(OneSide[ID]),BLANK())

 

Best Regards!

Dale

v-jiascu-msft
Employee

Hi @Daniil,

 

This issue has been fixed. Please check it out.

 

Best Regards,

Dale

Vicky_Song
Impactful Individual
Status changed to: Delivered