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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
HB13
Helper I
Helper I

Data Type differs from SQL to Power Query

Hello all

I created a view in SQL server where I have explicitly stated CreatedDate = cast(datefield as datetime) 

HB13_0-1661345557951.png

 

 

However when I pull this view into PowerBI the data type of this field is Text.
I do not want to change the data type in Power Query (this is causing query folding issues). I want to pull it into Power BI in it's correct format. 

Is it something that Power BI is doing or is the problem with the source data/view? Is there a way to fix it? 

Many thanks!

1 REPLY 1
Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

@HB13 - I am wondering if Power BI and SQL have different locale settings?  It might be converting the column to Text because 1/13/2022 is not recognised as 13-Jan-2022.

 

I know that other people have seen this issue before: Solved: SQL Tables importing without associated data types - Microsoft Power BI Community

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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