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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Krishna1992
Helper I
Helper I

Datatype is not same while importing from SQL Server with direct query in power BI desktop

Hello Everyone,

 

Datatype for sql server 2012 with direct query import to powerbi is not the same. 

 

SQL Server 2012:

Untitled.png

 

 

Powerbi:

Untitled2.png

 

Ex. in SQL Server 2012 datatype was int but while importing in powerbi it was float or decimal.

 

I cannot use import mode because file is huge.

 

What should I do ?

 

Please help me.

 

4 REPLIES 4
Anonymous
Not applicable

Hi @Krishna1992,

 

I can't reproduce this issue.(I test with sql 2016) Which version of sql and power bi desktop you test?  If you switch import mode, did this issue appears?

 

Regards,

Xiaoxin Sheng

Hi @Anonymous,

 

Used sql server 2012 and latest powerbi desktop.

 

In sql server 2012, added the tables and performed query to change the datatype. Meanwhile when I tried to import it into the powerbi desktop changed datatype (query which I performed doesnt take effect).

 

In import mode also same datatype is appearing but in import mode we can change the datatype.

 

But my issue is I need this in direct query only.

 

Please let me know if anything possible, do I need to change something in sql server.

Thanks.

Anonymous
Not applicable

Hi @Krishna1992,

 

It seems like you change column type after get data to power bi. If you create new report with same data source, did this data type issue appears again?

 

If data type issue fixed on new report, I'd like to suggest you save your direct query mode report as template.

After these steps, you can try to use template file to generate new report with same datasource to see if data type issue fixed.

Deep Dive into Query Parameters and Power BI Templates

 

Regards,

Xiaoxin Sheng

Hi @Anonymous,

 

I have converted in sql server and imported into the power bi.

 

No Issues thanks for the comment.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.