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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Integer Data Type Importing As Text - SQL Server Import

In Power BI Desktop, I'm building a query that starts with importing a view from SQL Server. Within the view is a column with type (INT, NULL). When I import the view, for some reason, it's being recognized as text. The weird thing is, I have another column in the view that's the exact same type, (INT, NULL); this column is being recognized as a whole number like I expected. I'll also mention that in creating this view, for the column that is not being recognized as a whole number, in the source table this column was originally text, which gets converted into an integer. Am I missing something, or is this actually the expected behaviour?

 

I'm also aware that there's options in Power BI Desktop to change the data type after it's been imported, however in doing so, it stops the query from folding. We need query folding in place because we're trying to apply incremental refresh to this table. Appreciate any comments/advice.

 

EDIT (2020/05/21): Also wanted to add that even though in Power BI desktop it's recognized as text, in the field itself, the value is italicized as if it is actually being recognized as a whole number. But in the column type label still shows up as text.

 

EDIT 2 (2020/05/22):  Thanks for everyone's feedback. Not sure what changed but after importing a few more times again, the data type is now correctly showing up as a whole number. Maybe just a brief glitch?

2 REPLIES 2
v-deddai1-msft
Community Support
Community Support

Hi @Anonymous ,

 

 

Based on my test, it will be whole number type after importing from sql server.  I really can't reproduce your issue. Please try to open a support ticket. If you have a Pro account it is free. Go to https://support.powerbi.com. Scroll down and click "CREATE SUPPORT TICKET".

 

Best Regards,

Dedmon Dai

Greg_Deckler
Super User
Super User

Weird, hard to troubleshoot, maybe you can used the Advanced option of the SQL connector to plug in some SQL code that forces it to come back as INT?


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.