cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ZeinabGad Frequent Visitor
Frequent Visitor

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
Raja26 Frequent Visitor
Frequent Visitor

Re: Fetching data from two different tables

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
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 43 members 1,084 guests
Please welcome our newest community members: