Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hi Guys,
There is an issue with the column I created.
Please refer the below table:
| Annual Usage | Typename | Desired Output Column: Annual Usage (MWh) | Unit |
| 1614892 | Electric | 1615 | kwh |
| 100000 | Gas | 0 | THM |
| 175400 | Electric | 175400 | MWh |
| 2356765 | Gas | 0 | THM |
| 16877654 | Electric | 16878 | kwh |
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
Solved! Go to Solution.
Hi @Anonymous ,
Can't you create a calculated column as follows:
new column =
IF (
[typename] = "Electric" && [Unit] = "kwh",
ROUND ( [AnnualUsage] / 1000.0, 0 ),
[AnnualUsage]
)
Hi @Anonymous ,
Can't you create a calculated column as follows:
new column =
IF (
[typename] = "Electric" && [Unit] = "kwh",
ROUND ( [AnnualUsage] / 1000.0, 0 ),
[AnnualUsage]
)
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
| User | Count |
|---|---|
| 130 | |
| 128 | |
| 59 | |
| 45 | |
| 45 |