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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

USERELATIONSHIP A table of multiple values was supplied where a single value was expected.

Hi All,

 

Need your expert help for the below issue,I'm tring to create  a relationship between fact and dim using USERELASTIONSHIP function

Below is the function i'm using to create a relationship.

HoldingRelation =
CALCULATE(DISTINCT('FACT'[CONTRACT]);
USERELATIONSHIP('FACT'[HOLDING_KEY];'DIM'[HOLDING_KEY]) )

However when i create the above formula , i am getting the error "A table of multiple values was supplied where a single value was expected."

Please advice what could be done.

error.PNGRELATE.png

visual.PNG

Regards,

athukuri

4 REPLIES 4
reza_rad
Advocate IV
Advocate IV

In your Calculate expression, you are not calculating a single value. You are getting DISTINCT which returns a table! Maybe you wanted to use DistinctCount?

Author, Consultant, Speaker
https://radacad.com
Anonymous
Not applicable

Thanks for the prompt response,I do understanfd the solution you provided however my requirement is to get multiple distinct rows as output,it would be great if you could help me.

A measure should return one single value. Not a table or multiple rows. If you want multiple values as the output, you can use ConcatenateX to combine them together

Author, Consultant, Speaker
https://radacad.com
Anonymous
Not applicable

Hi @reza_rad 

 

Can u please provide me the formula by using ConcatenateX function?

 

Thanks,

athukuri

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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