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
ninimoke
Helper I
Helper I

Convert Text to number with DAX

I have a derived column but the number there is in text format. I have tried different DAX formular to conver it to the right format(integer) but always get error e.g 

size integer = CONVERT(Sheet2[Size Value],INTEGER) =======> Cannot convert value '' of type Text to type Integer.
 
I was thinking maybe because there are some blank rows but not sure. Can someone hlep with the right DAX formular. Thanks.Capture.JPG
1 ACCEPTED SOLUTION

@ninimoke 
Actually I was expecting this response. Apparently you have more than just numbers in this column. In order to detect the cell(s) that have the problem use the following code then look for the blank cells:

IFERROR ( VALUE ( Sheet2[Size Value] ), BLANK ( ) )

View solution in original post

4 REPLIES 4
ninimoke
Helper I
Helper I

Hi @tamerj1 

Thank you!!! , that worked for me. I have tried using blank before but did not work but the IFERROR statement helped. Thank you so much.

tamerj1
Super User
Super User

Hi @ninimoke 
Try VALUE function >>> VALUE ( Sheet2[Size Value] )

Thanks for the response. Unfortunately I still face the same issue.

@ninimoke 
Actually I was expecting this response. Apparently you have more than just numbers in this column. In order to detect the cell(s) that have the problem use the following code then look for the blank cells:

IFERROR ( VALUE ( Sheet2[Size Value] ), BLANK ( ) )

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.

Top Solution Authors