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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Calculated Column

Hi Guys,

 

There is an issue with the column I created.

 

Please refer the below table:

 

Annual UsageTypenameDesired Output Column: Annual Usage (MWh)Unit
1614892Electric1615kwh
100000Gas0THM
175400Electric175400MWh
2356765Gas0THM
16877654Electric16878kwh

 

I actually want the desired output column for the unit kwh only. I dont want values for "Unit" MWh to change.

What can be done in this scenario?

new column = if([typename]="Electric", round([AnnualUsage]/1000.0,0), 0) +0 : I want a filter where Unit = kwh in my calculation.

 

I'm basically converting only kwh values to MWh.

 

Regards,

Himanshu

1 ACCEPTED SOLUTION
Pragati11
Super User
Super User

Hi @Anonymous ,

 

Can't you create a calculated column as follows:

 

new column =
IF (
[typename] = "Electric" && [Unit] = "kwh",
ROUND ( [AnnualUsage] / 1000.0, 0 ),
[AnnualUsage]
)

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

View solution in original post

1 REPLY 1
Pragati11
Super User
Super User

Hi @Anonymous ,

 

Can't you create a calculated column as follows:

 

new column =
IF (
[typename] = "Electric" && [Unit] = "kwh",
ROUND ( [AnnualUsage] / 1000.0, 0 ),
[AnnualUsage]
)

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.