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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
schaema3
Advocate III
Advocate III

Multiple values in distinct table

Hi, when using the 'Distinct' function to create a new table it should return an unique value based on the column selected. When trying to create a relationship from this new unique value table I am getting the following error: "You can't create a relationship betwenn these two columns because one of the columns must have unique values." I was under the impression creating a 'Distinct' table the values returned must be unique. Also removing blank cells doesn't work if it's a table and not a querry. Can anyone suggest what I am doing wrong?

2 ACCEPTED SOLUTIONS

I think I found a workaround by using the following DAX: PivotTable = DISTINCT(FILTER(VALUES(SourceFile[SourceColumn]),LEN(SourceFile[SourceColumn])>0)). That way I removed any blank lines that actually caused the Error with 'Multiple' values. As a result, Power BI reads a blank column not as a value. Maybe there's an easier way but in my case it resolved the problem.

View solution in original post

@schaema3,

Glad to hear the issue is solved, you can accept appropriate replies as answer to close this thread.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yuezhe-msft
Employee
Employee

@schaema3,

Could you please post your DAX and share sample data of your tables? To solve the above error message, please check my DAX in the similar thread below.

https://community.powerbi.com/t5/Service/Cannot-create-relationship-between-two-columns/td-p/121783

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I think I found a workaround by using the following DAX: PivotTable = DISTINCT(FILTER(VALUES(SourceFile[SourceColumn]),LEN(SourceFile[SourceColumn])>0)). That way I removed any blank lines that actually caused the Error with 'Multiple' values. As a result, Power BI reads a blank column not as a value. Maybe there's an easier way but in my case it resolved the problem.

@schaema3,

Glad to hear the issue is solved, you can accept appropriate replies as answer to close this thread.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors