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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
fdkza
Frequent Visitor

DIRECTQUERY from REDSHIFT changes int to text

Hi 

 

I am importing a dim-time table from redshift that contains all the hours their respective formats including am/pm variants. Powerbi does not recognise int = 0 as a whole number and changes the colum to text as well as changing my time format to text. Is there anyway i can force powerbi to not autodetect datatypes for that table ? 

3 REPLIES 3
v-yulgu-msft
Employee
Employee

Hi @fdkza,

 

You can change the data type to Date in Power BI desktop under Modeling tab.

 

Besides, what is the format of date values in source dim-time table, can you show us an example?

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The issue with that is that it changes the directquery to import mode which is something that I dont want.

 

The fileds in question looks like follows. both of them get imported as text value which means that i cant sort them properly on a chart  

 

TimeHour (Int) TimeFormat (time)
000:00
101:00
202:00
303:00
404:00
505:00
606:00
707:00
808:00
909:00
1010:00
1111:00
1212:00
1313:00
1414:00
1515:00
1616:00
1717:00
1818:00
1919:00
2020:00
2121:00
2222:00
2323:00

Hi @fdkza,

 

You may hit the limitations of Direct Query. Please make sure the data type of time fields in data source is set to Date/Time.

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.