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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
sarah2_williams
Helper III
Helper III

Errors in column due to incorrect data type

Hi guys,

 

I have some columns in my data that are a mix of text and number, (it's ages so I have, "17 and under" then 18, 19, 20, 21 up to "75 and over"

 

When i've imported the data it has converted the column to whole number, which means "17 and under" and "75 and older" are showing as an error "Can't convert to number", i've transformed the colum to text, but it still shows these are error. 

 

Am I going wrong somewhere? should I be doing something else to transform this into Text? I have transformed and refreshed the data but it's still showing those values as error.

 

Thanks! 

1 ACCEPTED SOLUTION
Pragati11
Super User
Super User

Hi @sarah2_williams ,

 

I would say give this column a datatype = TEXT just after the data is loaded in Power BI.

Power BI assigns a datatype to a column by default based on the Top 200 rows it sees in the data.

  1. Go to Power Query Editor
  2. Under Applied Steps for this data you will see the first step is SOURCE
  3. Just after this SOURCE step add a new step with datatype chnage for your column as TEXT

This will resolve your issue.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

View solution in original post

4 REPLIES 4
Pragati11
Super User
Super User

Hi @sarah2_williams ,

 

I would say give this column a datatype = TEXT just after the data is loaded in Power BI.

Power BI assigns a datatype to a column by default based on the Top 200 rows it sees in the data.

  1. Go to Power Query Editor
  2. Under Applied Steps for this data you will see the first step is SOURCE
  3. Just after this SOURCE step add a new step with datatype chnage for your column as TEXT

This will resolve your issue.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

@Pragati11 I have a particular case where Power Query makes the conversion automatically after expanding a table, so it does not work for me when I change the Column Type to Text, the Error is mantained:

Torga_0-1721131120115.pngTorga_1-1721131145036.png

Here is the error message:

Torga_2-1721131203006.png

The real value is something like: 52689-P-7K.

 

Hope someone who cal help is around.

 

Regards!

Hi @Anonymous ,

 

Can you please share the screenshot of Applied Steps for this query of your's ?

 

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

@Pragati11Many thanks for your willingness to help. I have already solved the issue by editing the query "Transform Files," the one that is automatically created when a record is expanded, and changing the column type to the correct one there.

Torga_0-1721651869004.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.