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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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?

@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.