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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
mrben100
Frequent Visitor

Join 2 tables left outter join fo 2 columns

I have the following data sample

Untitled1.png

I am trying to get for each machine 28 rows of data with 0 values for col1 & col2 for the rows that does not exist.

So i created another table by the following function

GENERATE(DISTINCT(merge1[Date]),SELECTCOLUMNS(DISTINCT(merge1[Machine]),"Machine1",[Machine]))

and i got this

Untitled2.png

So i tryed to join the 2 tables by (NATURALLEFTOUTERJOIN) but i got the error (

at-least one common join column).

I want my result table looks like the first table with 56 rows & 0 value for col1 & col2 for the new rows.

the date column & Machine column filled with its info.

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @mrben100 

If you could use LOOKUPVALUE Function in table that based on GENERATE(DISTINCT(merge1[Date]),SELECTCOLUMNS(DISTINCT(merge1[Machine]),"Machine1",[Machine])) 

Column1 = LOOKUPVALUE(merge1[col1],merge1[Date],'Table'[Date],merge1[Machine],'Table'[Machine1])
Column2 = LOOKUPVALUE(merge1[col2],merge1[Date],'Table'[Date],merge1[Machine],'Table'[Machine1])

Result:

3.JPG

 

Best Regards,

Lin

Community Support Team _ Lin
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-lili6-msft
Community Support
Community Support

hi, @mrben100 

If you could use LOOKUPVALUE Function in table that based on GENERATE(DISTINCT(merge1[Date]),SELECTCOLUMNS(DISTINCT(merge1[Machine]),"Machine1",[Machine])) 

Column1 = LOOKUPVALUE(merge1[col1],merge1[Date],'Table'[Date],merge1[Machine],'Table'[Machine1])
Column2 = LOOKUPVALUE(merge1[col2],merge1[Date],'Table'[Date],merge1[Machine],'Table'[Machine1])

Result:

3.JPG

 

Best Regards,

Lin

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

waiting for help

waiting for help

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.

Top Solution Authors
Top Kudoed Authors