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
Anonymous
Not applicable

Datatype

When im trying to change my datatype from ABC123 to whole numbers it doesnt work. There was a row with text there before but i replaced the data with 0. The query has been appended before so i tried to replace the row with the text in the previous query as well. This didnt work. Is there a way for me to change the datatype without starting over? 

1 ACCEPTED SOLUTION
edhans
Super User
Super User

  1. Do your transformation to change from ABC123 to Integer.
  2. On the Home ribbon, select the Keep Rows dropdown and "Keep Errors"
  3. Put your cursor next to the word "error" (don't click on the word "error") and look at the yellow box at the bottom of the screen.

It will tell you why it is having trouble. You can then clean that up as well before you do the ABC123-Integer conversion. In my sample below I entered the text "aaa" in a column of numbers.

 

20200127 18_18_23-Untitled - Power Query Editor.png



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

3 REPLIES 3
edhans
Super User
Super User

  1. Do your transformation to change from ABC123 to Integer.
  2. On the Home ribbon, select the Keep Rows dropdown and "Keep Errors"
  3. Put your cursor next to the word "error" (don't click on the word "error") and look at the yellow box at the bottom of the screen.

It will tell you why it is having trouble. You can then clean that up as well before you do the ABC123-Integer conversion. In my sample below I entered the text "aaa" in a column of numbers.

 

20200127 18_18_23-Untitled - Power Query Editor.png



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

If the column has the same sub-String such as "ABC", we can use Table.ReplaceValue to remove it and then change it to whole number.

 


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
HotChilli
Super User
Super User

What error message are you getting?

If you use the View menu->Column Quality you can track these issues down.

Also, at the bottom of the screen, profiling can be changed to look at the whole dataset rather than the first 1000 rows

Helpful resources

Announcements
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.

June 2025 community update carousel

Fabric Community Update - June 2025

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