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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

SQL Server smallint data get converted to numeric in Power Query

Here's a thread on Community establishing the the fact that values typed as smallint in SQL Server are convereted to numeric in Power Query.  Utilizing "Detect Data Type" will change it to Whole Number, but that breaks the query folding.  Don't know why it just can't get it right the first time.

Status: Needs Info
Comments
Anonymous
Not applicable

Hi @jmgPRPA ,

 

Sorry, what's your problem? What do you want to know?

 

Best regards,

Community Support Team Selina zhu

jmgPRPA
New Member

Why does Power Query change a data typed as smallint in SQL Server to numeric instead of whole number.

Anonymous
Not applicable

Hi @jmgPRPA ,

 

This document has a description of data types in power query, hope it can help you.

Data types in Power Query - Power Query | Microsoft Learn

 

Best regards,

Community Support Team Selina zhu

HenrikJeppsson
Frequent Visitor
It looks likes this has not been adressed. I try to help by explaining what the Original Poster is refering to. When you to an M-query like the one below Columns of various types os SQL servere ingegers are wrongly mapped. SQL Server - M [Int]->Int64.Type Correct [Smallint]->Number.type WRONG same error goes for [TinyInt], [Bigint] seems fine. let a = Sql.Database("dwh.REDACTED.int", "dwh"), b = a{[Schema="pbi2",Item="f_FinanceGL_InclBudget"]}[Data] in b