Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

How can I create this table or matrix ?

Hi community,
I have two tables just like the next examples;

Table 1

ItemTotal Qty to DeliverOnSite Available PcsOffsite Available PcsRemainTotal Available Pcs
A320192288-128480
B225100234-125334
C24537214-208251
D123526423299
E02927229301

 

Table 2

ItemPalletBoxesPices
A0000000000010007919728168
B0000000000010017925517102
C0000000000010023056724112
D0000000000010002149322132
E0000000000010012675422132
A0000000000010029120922120
B0000000000010029933522132
C0000000000010018360317102
D0000000000010003092122132
E0000000000010007919722140

 

The Table 2 is the OffSite Available Stock, but it's splited by Pallet.
I need a table/matrix that gives me the pallets to bring for can supply the qty to deliver, trying to bring the most matchable pallet by qty between the remain that i need to complete & the qty in the pallet.

Something like this; 

ItemPallets To BringPallets To Bring IDPCS
A100000000000100079197168
B100000000000100299335132
C100000000000100183603102
C100000000000100230567112
D0NullNull
E0NullNull


How can i make it possible on Power BI?
I've trying for days and I still have no idea about to create this table...

I hope you can help me, 
Thank you. 

2 Replies

  • v-yingjl's avatar
    v-yingjl
    Community Support

    Hi Anonymous ,

    Seems like your expected output not very clear. For example, in your final table, why Item C should have two rows, how to define its calculation logic because I cannot see other relationship between two tables except items. Also, if you want Item D,E show null, maybe remain>0? But how to define other items...not certain

    Perhaps need more details about this issue for further discussion.

     

    Best Regards,

    Yingjie Li

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi v-yingjl ,
      Thanks to take time to try to help me, ill try to be more clear...
      For example, in the case of item B, the request (qty to deliver) is for 225 pcs, On Site I only have 100, the output table or matrix gives me pallet 00000000000100299335 with 135 pcs cause I need 125 pcs more to complete the request.
      In the case of C, (thats why I think it could be a matrix), the request (qty to deliver) is for 245 pcs, On site I only have 37 pcs, I need to bring 208 pcs more from the stock out of the site (table B).
      In the table B, I have two pallets of item C;  00000000000100230567 with 112, and the 00000000000100183603 with 102, 214 pcs in total. Reason why the output table or matrix gives me the two rows for item C = the two pallets that i need to complete the request. 
      In the case of D & E items, I dont care if i have or not rows of them in the output table, because i can supply the request with the Onsite pcs or dont have request. I think is more logical to dont have rows of them if i dont need to bring pcs. 
      I hope I have been clearer, let me know if i need to explain something more or in a diferent way. Thank you.