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.

Reply
admin11
Memorable Member
Memorable Member

Link Table for Customer get error msg

Hi All

My AR table customer table unable to link with my SOURCE table. 

 

i using this expression to link :-

Customer = DISTINCT(UNION(ALL(AR[Customer/Vendor Code]), all(SALES[CUST_ID])) )

 

I get below error msg :-

Column '' in Table '' contains blank values and this is not allowed for columns on the one side of a many-to-one relationship or for columns that are used as the primary key of a table.

 

admin11_0-1641354327837.png

 Can some one advise me how to clear the error msg ?

 

Sample PBI file :-

https://www.dropbox.com/s/8ggmos7cydb9wzu/PBT_V2021_115%20SOLVE%20ar%20CUSTOMER%20NOT%20LINK.pbix?dl...

 

Paul

 

1 ACCEPTED SOLUTION

Hi @admin11 ,

 

The reason for the error is that this column contains null values.

vstephenmsft_1-1641542816947.png

 

Result after filtering out blank values

Customer = DISTINCT(UNION(ALL(AR[Customer/Vendor Code]), filter(all(SALES[CUST_ID]),[CUST_ID]<>BLANK())) )

vstephenmsft_2-1641542945915.png

 

Best Regards,

Stephen Tao

 

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

4 REPLIES 4
VahidDM
Super User
Super User

Hi @admin11 

 

Try this:

Customer = DISTINCT(UNION(values(AR[Customer/Vendor Code]), values(SALES[CUST_ID])) )

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

New Year Power BI eCard:

 

https://community.powerbi.com/t5/Data-Stories-Gallery/Happy-New-Year/td-p/2266398

 

 

 

eb50dd_d85fbe053af7491e915ca41732d978a7~mv2

 

@VahidDM 

Thank you for  sharing.

I have try your expression , it still have error.

admin11_0-1641389752805.png

 

Hi @admin11 ,

 

The reason for the error is that this column contains null values.

vstephenmsft_1-1641542816947.png

 

Result after filtering out blank values

Customer = DISTINCT(UNION(ALL(AR[Customer/Vendor Code]), filter(all(SALES[CUST_ID]),[CUST_ID]<>BLANK())) )

vstephenmsft_2-1641542945915.png

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

@v-stephen-msft 

Thank you very much for your help, it work fine now.

Paul

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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