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
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
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
Top Kudoed Authors