Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi Team,
There are two tables - Main & Delivery table. (Refer the table below) Main table needs quantity from Delivery table to fulfil the WO need – i.e. column C is the required quantity column in Main table. The sequence in which these lines get materials is specified in column D. Furthermore in Delivery table there would be multiple deliveries and the sequence in which material gets allotted to Main table from Delivery table is specified in column D. We want to achieve the below mentioned "Required output" in main table
Table 1 (Main Table)
Work order | Material | Required Qty | Sequence of delivery allocation | Required Output (From Table 2) |
1 | 1 | 3 | 3 | d |
2 | 1 | 10 | 2 | a,b,c |
3 | 1 | 11 | 1 | a |
Table 2 (Delivery table)
Delivery | Material | Quantity | Sequence |
a | 1 | 17 | 1 |
b | 1 | 3 | 2 |
c | 1 | 1 | 3 |
d | 1 | 3 | 4 |
e | 1 | 9 | 5 |
Kind Regards
@RubanBasilea , I am somehow still not able to related table 1 and table 2 for expected output. Can you explain with an example of how you got a,b,c
First iteration in Table 1 : In the above example, Work order ‘3’ is the first line to get materials (this is based on sequence=column D) and it requires 11 quantity. This line will get materials from delivery ‘a’ since it has 17 quantities and it is the first line to give away materials (again this is based on sequence in table 2).
After this first iteration, in Table 2 for delivery ‘a’ since 11 quantities are already consumed by Work order ‘3’. The remaining quantity of ‘a’ in table2 would be 6.
Now for the second iteration in Table 1 : Work order ‘2’ is the second line to get materials (this is again based on sequence=column D) and it requires 10 quantity. This line will get materials from three different deliveries. This is because delivery ‘a’ has 6 quantities left, delivery ‘b’ has 3 quantities and delivery ‘c’ has 1 quantity .
After this second iteration, in Table 2 for deliveries a, b & c are completely consumed. The only open deliveries available are d & e.
Now, for third iteration : Work order ‘1’ is the last line to get materials (this is again based on sequence=column D) and it requires 3 quantity. This line will get materials from delivery d since it has 3 quantities.
Finally after this third iteration, in Table 2, Deliveries a,b,c & d are completely consumed. The only open delivery left out would be ‘e’.
Hope this will be clear
Thanks
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
79 | |
64 | |
52 | |
48 |
User | Count |
---|---|
217 | |
89 | |
76 | |
67 | |
60 |