Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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
 
1 ACCEPTED SOLUTION
KT_Bsmart2gethe
Impactful Individual
Impactful Individual

Hi @Anonymous ,

 

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

then [Qty]*2

else [Qty]/2

 

Regards

KT

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thanks @KT_Bsmart2gethe it helped

KT_Bsmart2gethe
Impactful Individual
Impactful Individual

Hi @Anonymous ,

 

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

then [Qty]*2

else [Qty]/2

 

Regards

KT

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors