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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
SBC
Helper III
Helper III

Need to Calculate conversion quantity in Power BI

Hi Folks,

I have a requirement to convert all measurementquantityamount  of MT,M3,USG to BBL,

we need to  show all MT,M3,USG  quantityamount  in BBL quantityamount.

Example:

1 BBL = 0.1183432 MT,

1 BBL= 0.159 M3,

1BBL = 42 USG

Below is the Screeenshot of source in different formats MT,M3,USG and BBL need to convert to  all to BBL measuremtnquantityamount .

SBC_2-1662015251928.png

We need to show all M3,MT,USG  in BBL quantityamount, Need solution in  DAX  or method to achieve this.

 

 

 

Thanks,

SBC

 

 

 

 

 

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @SBC 
Another way is to have a "Conversion" table linked with your table

Measuring Unit Converion Factor
MT 0.1183432
M3 0.159
USG 42
BBL  1

Then you can link Converion[Measuring Unit] with TableName[MsrmntQtyUom] (One - Many single way realtionship)

Then use 
BBLMsrmntQtyAmt = TableName[MsrmntQtyAmt] * RELATED ( Converion[Converion Factor] )

View solution in original post

4 REPLIES 4
tamerj1
Super User
Super User

Hi @SBC 
Another way is to have a "Conversion" table linked with your table

Measuring Unit Converion Factor
MT 0.1183432
M3 0.159
USG 42
BBL  1

Then you can link Converion[Measuring Unit] with TableName[MsrmntQtyUom] (One - Many single way realtionship)

Then use 
BBLMsrmntQtyAmt = TableName[MsrmntQtyAmt] * RELATED ( Converion[Converion Factor] )

Hi @tamerj1 ,

I have tried this method ,works fine for MT,M3 and USG,But for BBL it is showing blank values instead of displaying the  associated values .as below screenshot.

 

 

SBC_0-1662022761464.png

 

Thanks,

SBC

 

@SBC 

Check the spelling. Could be spaces

Fowmy
Super User
Super User

@SBC 

You can add a calculated column as follows:

 

Conversion  = 
 VAR __FACTOR = SWITCH ( 'table'[MsrmntQtyUom], "MT", 0.1183432, "M3" = 0.159, "USG" = 42, "BBL", 1 )
    VAR __RESULT = DIVIDE('table'[MsrmntQtyAmnt], __FACTOR )
    RETURN
        __RESULT

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.