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
ZeinabGad
New Member

Fetching data from two different tables

Hello 

 

I'm currently facing a problem with merging to tables together 

 

 

In one table I have the SKU running on the line and in the other table I have the description of the problem that happened on the line. 

 

I want to identify on which SKU I had a bad material issue 

 

Knowing that I'm having a problem with merging the two tables because in table 2, I have the same date for the same line , for the same shift but for different issues. 

 

Can anyone help with that? 

 

Thanks 

 

Table 1

 

 

DayLine ShiftCodeSKU
2-Feb-2019Line01Aaaa444SKU1
2-Feb-2019Line01Bxxx111SkU2
2-Feb-2019Line01Cxxx222SKU3
2-Feb-2019Line02Azzz111

SKU4

2-Feb-2019Line02Bzzz222SKU5
2-Feb-2019Line02Caaa111SKU6
2-Feb-2019Line03Aaaa222SKU7
2-Feb-2019Line03Baaa222SKU7
2-Feb-2019Line03Ceee333SKU9

 

 

Table 2 

 

 

DayLine ShiftProblem Decription
2- FebLine 3ABad material
2- FebLine 3BBad material 
2- FebLine 3BBad receipe 
2- FebLine 3BBad alignment 
2- FebLine 3CBroken acrylic 
2- FebLine 3Cmachine failure
2- FebLine 3CBreakdown
1 REPLY 1
Anonymous
Not applicable

Please check if this makes sense.

 

I have added a helper column in both the tables by merging Day, Line & Shift.

Then established a relationship between 2 tables using the helper columns.Table1.png

 Table2.png

Using the below dax formula, Created a calculated column the table where you have the Problem description to match & pull the associated SKU ID's from table 1.

SKU = LOOKUPVALUE(SKUTable[SKU],SKUTable[Merged],PrbDescription[Merged])

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.

Top Solution Authors