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

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

Reply
Anonymous
Not applicable

Formatting Calculated Column

Hi Guys,

 

Please refer the below table:

 

I've the two columns in my report i.e Usage and Unit and want the third column which will be Unit(Kwh).

I want the uasge values to get multiplied by 1000 where ever unit is mWh and rest should remain same.

 

I got one part of the expected solution using the below formula but kWh values were missing. Kindly help. me with this.

 

Unit (Kwh) = IF (
VIEW_FORECASTREVENUE[COMMODITY] = "Electric" && [Unit] in{ "mWh" },
ROUND ( VIEW_FORECASTREVENUE[FORECASTEDUSAGE] * 1000.0, 0 )+0)+0

 

Regards,

Himanshu

 

UsageUnitExpected Output Column: Unit(kWh)
43450kWh43450
2430mWh2430000
4500mWh4500000
2365kwh2365
12345mWh12345000
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try like

Unit (Kwh) = IF (
VIEW_FORECASTREVENUE[COMMODITY] = "Electric" && [Unit] in{ "mWh" },
ROUND ( VIEW_FORECASTREVENUE[FORECASTEDUSAGE] * 1000.0, 0 )+0, VIEW_FORECASTREVENUE[FORECASTEDUSAGE])+0

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Try like

Unit (Kwh) = IF (
VIEW_FORECASTREVENUE[COMMODITY] = "Electric" && [Unit] in{ "mWh" },
ROUND ( VIEW_FORECASTREVENUE[FORECASTEDUSAGE] * 1000.0, 0 )+0, VIEW_FORECASTREVENUE[FORECASTEDUSAGE])+0

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors