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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors