Forum Discussion
Power Query - Inventory allocation
- 5 years ago
Hi Djpejsen ,
Sorry for the late reply.
It is indeed not an easy case and it did take me many days.
I cant find a simpler way.Hope my way below would be a solution for you.
First go to query editor>unpivot columns to get below table:
Then in outbound table,I create several columns to tranform the data.
Finally,I got below calculated table.
Table = DISTINCT ( UNION ( SELECTCOLUMNS ( 'outbound', "Sales Order", [Sales order], "Item", 'outbound'[Item], "Proritet", 'outbound'[_proritet], "Qty", 'outbound'[final adjust], "Index", 'outbound'[Index] ), SELECTCOLUMNS ( 'outbound', "Sales Order", [Sales order], "Item", 'outbound'[Item], "Proritet", 'outbound'[new proritet], "Qty", 'outbound'[round1], "Index", 'outbound'[new index] ) ) )And you will see:
What you want is as below:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my reply as a solution!
Hi Djpejsen ,
Sorry for the late reply.
It is indeed not an easy case and it did take me many days.
I cant find a simpler way.Hope my way below would be a solution for you.
First go to query editor>unpivot columns to get below table:
Then in outbound table,I create several columns to tranform the data.
Finally,I got below calculated table.
Table =
DISTINCT (
UNION (
SELECTCOLUMNS (
'outbound',
"Sales Order", [Sales order],
"Item", 'outbound'[Item],
"Proritet", 'outbound'[_proritet],
"Qty", 'outbound'[final adjust],
"Index", 'outbound'[Index]
),
SELECTCOLUMNS (
'outbound',
"Sales Order", [Sales order],
"Item", 'outbound'[Item],
"Proritet", 'outbound'[new proritet],
"Qty", 'outbound'[round1],
"Index", 'outbound'[new index]
)
)
)
And you will see:
What you want is as below:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!