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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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