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
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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.