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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors