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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
domtrump
Helper II
Helper II

Calculated column - convert data type

I have a table in my data model that was loaded from a query. I have a column that came over as text. I need an additional column that has this column represented as an integer. No longer have access to the original data source so can't be done in power query. I tried the following from an example in the Help but it just results in error. 

Syntax

DAX
CONVERT(<Expression>, <Datatype>)  

 I type CONVERT(Table[MyTextColumn],INTEGER) 
Error: 

domtrump_0-1711645638522.png

How can I accomplish what I need?

2 REPLIES 2
Anonymous
Not applicable

Hi @domtrump 

 

Thanks for the reply from @lbendlin , please allow me to provide another insight:

In excel, the Syntax of Convert() function is that:

CONVERT(number,from_unit,to_unit)

vzhengdxumsft_0-1712027009422.png

Here are detailed description of this function:

CONVERT function - Microsoft Support

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Cannot reproduce

 

Table = ADDCOLUMNS({"10"},"num",CONVERT([Value],INTEGER))
 
Show more of your DAX.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.