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
JGSmith123
New Member

Convert text to number

Hello

 

I have a column of numbers that was imported as a text. I wanted that changed to a Fixed Decimal Number. This needed to be the case in 2 columns. 

 

In both columns every cell converted appropriately except for the first cell. They both say "Error". 

 

When I click on the Error to see what they problem is, I receive this notice:

 

 

 

DataFormat.Error: We couldn't convert to Number.
Details:
     24.80%

 

I have done nothing different to this cell from any of the others below it. 

 

I have deleted the Data and re-entered it but I keep getting the same problem. The data comes from a website and you can see it here: http://www.barrons.com/articles/best-100-hedge-funds-for-2015-1431743869

 

I have looked through everything I can find in the help pages that deals with converting Data Types but I have yet to find my answer. 

 

Would anybody be able to point me in the right direction to find out how to fix this?

 

Capture.PNG

Thank you very much for your help

 

You can see a screenshot of what I am referring to here:

1 ACCEPTED SOLUTION

@JGSmith123

 

Replace "%" before to convert to number the columns.

 

A guide:

 

Step 1:Step 1: Edit QueryStep 1: Edit QueryStep 2: First row as headerStep 2: First row as headerStep 3: Delete first rowStep 3: Delete first rowStep 4: Replace %Step 4: Replace %Step 5: Convert to NumberStep 5: Convert to NumberStep 6: ReadyStep 6: Ready

 

 




Lima - Peru

View solution in original post

4 REPLIES 4
ankitpatira
Community Champion
Community Champion

@JGSmith123 first row has value '24.80%' where '%' is blocking it to be converted to a number. You can simply do replace values in power bi desktop query editor and remove '%' sign and that should work.

Thank you very much for your response!

 

Here is a picture of me trying to do just that but I keep getting an error message saying that I need to enter a numerical value.

 

Capture.PNG


@JGSmith123 wrote:

Thank you very much for your response!

 

Here is a picture of me trying to do just that but I keep getting an error message saying that I need to enter a numerical value.

 

Capture.PNG


@JGSmith123

 

Undo the "Changed Type" step (namely revert this column from decimal to text) and then replace the "%" with blank.

Capture.PNG

 

I've also noticed that there're more invalid rows appended. Do remember to uncheck them.

Capture.PNGCapture2.PNG

@JGSmith123

 

Replace "%" before to convert to number the columns.

 

A guide:

 

Step 1:Step 1: Edit QueryStep 1: Edit QueryStep 2: First row as headerStep 2: First row as headerStep 3: Delete first rowStep 3: Delete first rowStep 4: Replace %Step 4: Replace %Step 5: Convert to NumberStep 5: Convert to NumberStep 6: ReadyStep 6: Ready

 

 




Lima - Peru

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.