Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

if condition in powerquery

QtyReqUom Base UomMatch
25lblbTRUE
30kgkgTRUE
40lbkgFALSE
50kglbFALSE

Am trying to write a formular in powerquery because it is a table i append in power query so i need the calculation in power query.

 
if the match is false and the req uom is in "kg"  i want to multiply the quantity by 2 to change it to "lb"
and if the match is false and the req uom is in lb" i want to divide the quantity by 2 to change to "kg"
 
so the base uom is the standard unit
 
  • Hi Anonymous ,

     

    if [UomMatch] = false and [Base]= kg

    then [Qty]*2

    else [Qty]/2

     

    Regards

    KT

2 Replies