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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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
Anonymous
Not applicable

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

 

Anonymous
Not applicable

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.

 

@Anonymous 

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

Paul

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.