Forum Discussion

Oros's avatar
Oros
Icon for Post Prodigy rankPost Prodigy
4 years ago
Solved

Split and calculate

Hello.   I have items in the following packaging format.  How do you split and calculate the total weight?  Thanks.   Item #1 = 10X3KG = 30KG Item #2 = 10X2X5KG (this means that 1 box has 10 pac...
  • amitchandak's avatar
    4 years ago

    Oros , First Split in Power Query. text after delimiter, start from the end, and separate Number and KG part

    Then split the first part again on delimiter X  and Split the part two using Split by Digit and non digits

     

    you will set 3 column, create a new column by multiplying them

     

    Text Before Delimiter and Text After Delimiter: https://youtu.be/oGY4RoPKDOE

    Split Column Power Query: https://youtu.be/FyO9Vmhcfag

    Split Column By Digit to Non Digit & Non Digit to Digit: https://youtu.be/tY4Yk1crS9s

  • Anonymous's avatar
    Anonymous
    4 years ago

    HI Oros,

    You can merge the two columns that store the 'unit' of product and do replace operations on three value fields to replace null value with 1.

    After these steps, you can simply calculate three value fields and merge them with the unit field to show the wanted results.

    Replace values (Power Query) (microsoft.com)

    Regards,

    Xiaoxin Sheng