Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
Day | Line | Shift | Code | SKU |
2-Feb-2019 | Line01 | A | aaa444 | SKU1 |
2-Feb-2019 | Line01 | B | xxx111 | SkU2 |
2-Feb-2019 | Line01 | C | xxx222 | SKU3 |
2-Feb-2019 | Line02 | A | zzz111 | SKU4 |
2-Feb-2019 | Line02 | B | zzz222 | SKU5 |
2-Feb-2019 | Line02 | C | aaa111 | SKU6 |
2-Feb-2019 | Line03 | A | aaa222 | SKU7 |
2-Feb-2019 | Line03 | B | aaa222 | SKU7 |
2-Feb-2019 | Line03 | C | eee333 | SKU9 |
Table 2
Day | Line | Shift | Problem Decription |
2- Feb | Line 3 | A | Bad material |
2- Feb | Line 3 | B | Bad material |
2- Feb | Line 3 | B | Bad receipe |
2- Feb | Line 3 | B | Bad alignment |
2- Feb | Line 3 | C | Broken acrylic |
2- Feb | Line 3 | C | machine failure |
2- Feb | Line 3 | C | Breakdown |
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.
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])
User | Count |
---|---|
47 | |
26 | |
21 | |
17 | |
15 |
User | Count |
---|---|
53 | |
34 | |
17 | |
17 | |
15 |