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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Satya_04
Helper I
Helper I

Convert million to billion

I have a column where Units can be in billions or millions. If it is in millions, then it needs to be converted into billion.

Can you please guide me?

 

I am currently getting error "Expressions that yield variant data-type cannot be used to define calculated columns."

 

Satya_04_1-1679553552238.png

 

2 REPLIES 2
CNENFRNL
Community Champion
Community Champion

Refer to the last section of this guide FORMAT - DAX Guide


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Tahreem24
Super User
Super User

@Satya_04 Try this measure:

Measure =
VAR Mill_ = CALCULATE(SUM('Table'[Value])*1000, FILTER('Table','Table'[Units]="Millions of U.S. Dollars"))
RETURN IFMAX('Table'[Units]) = "Billions of U.S. Dollars"SUM('Table'[Value]) , Mill_ )

Tahreem24_0-1679555795525.png

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.