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
preetks
Employee
Employee

Excel data source not updating data type correctly

Hi,

 

I have a pbix file which is connected to an Excel file on SharePoint as the data source. One of the columns in the Excel file is filled with numbers. I added new rows, where some of the entries are in decimals. When I refresh the Excel dataset, all the decimal-point entries are getting removed within that column.

When I view the "Column Type" in PowerBI desktop, it shows as "Whole number" for the specific column. That would explain why the values which are in decimals. I am unable to change the data type in the toolbar. When I go to Data Source Options, it says - "options are not available because the file uses a live connection to another model".

 

Is there any way to change the datatype for an existing column in the Excel based dataset? Or do I need to recreate the whole dataset and recreate everything in the PowerBI report?

 

 

Thanks.

3 REPLIES 3
v-jayw-msft
Community Support
Community Support

Hi @preetks ,

 

You could check "Never detect column types and headers for unstructured sources" so that the column type won't be changed when loading data.

2.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
preetks
Employee
Employee

@amitchandak - As mentioned in the original post, the data source is an Excel file on SharePoint. And the options to transform the data type are disabled.

preetks_0-1609863337002.png

 

This is what I see when I view the properties of the column in the dataset. Data type is set to whole number and I am unable to change it.

preetks_1-1609863397305.png

 

When I go to data options, it doesn't let me change those also.

preetks_2-1609863524632.png

 

Hope this clarifies.

 

amitchandak
Super User
Super User

@preetks , Open Power Query/Transform Data. There you have the option to change the data type there.  You can change it there. Or you can right click on the table in power query, open advance editor. Find the column type should be int.64 , change it to numeric

 

My Video has steps other than the change of data type.

https://youtu.be/h0yLtceT0i4

 

Check the data type when I add the new column. You will get the correct one number (numeric or decimal)

 

Post that; go and change again in Column tools if needed

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.