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

Data load - Column type predetermined by Power BI

Hi Community

 

I am having some difficulty selecting data type for columns I import.

 

When I import an Excel file on the Desktop version, after selecting 'get data', I am presented with this screen:

 

Data import window.PNG

 

As you can see it says data has been truncated due to size. At this point Power BI has also already decided what it would it believes each column type to be.

 

As you can see, is believes the first column is text, and the second numerical.

 

POSITION A: I will refer back to this position just now.

 

I will then select "Edit" and move on to the Power Query Editor screen:

 

Power Query Editor.PNG

 

At this point I should be able to change the data type of the columes, which you know I can do by clicking on the ABC, 123, etc. 

 

My problem comes in that, for example with column two, Power BI has already decided at POSITION A that this column is numerical. So when I change it to text, all the cells you see will move to the left hand side, as it is now text, which is obviously not a problem. The problem is that when it decided at POSITION A that the column is numerical, further down there were other cells in the column that had some letters in (which it did not look at when making its initial choice), which were thus text, and since not being numerical they were already read as errrors as soon as we moved to the second screen above. So after I change the column to text as it should be, or even if I leave it, how Power BI has already predetermined that this column is a certain type based on only a few rows is causing me obvious problems.

 

Only workaround I have at the moment is to first pull in a dummy file with all the same heading and ensure that the type of data that I want power bi to pick up is in the first few rows, as after POSITION A for me to try and change it is worthless.

 

Any advice on how I can either get Power BI to look at all the rows on the first load when determining the data type of each column, or how I can get it to not enforce its initial data type selection as strongly will be much appreciated.

 

Many thanks.

 

Regards

Renier

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

HI, @Anonymous 

Just click File->Options and Settings->Options

Then currenrt file and disable Type Detection

6.JPG

 

Best Regards,

Lin

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

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

HI, @Anonymous 

Just click File->Options and Settings->Options

Then currenrt file and disable Type Detection

6.JPG

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
gpiero
Skilled Sharer
Skilled Sharer

 

 

@Anonymous 

Hi,

 

this one could be an option. It gives you the complete control to change datatype according your needs.

 

Otherwise you could select "Based on entire dataset".

pict.PNG

 

 

 

If I can...

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.