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
akhaliq7
Continued Contributor
Continued Contributor

Would like to get a date field from my database rather than a datetime field

Would like to get a date field from my database rather than a datetime field, When I am using a native query (I know this is not recommended), I don't want to get a datetime field as I can't then use it with a date table. using power query will slow down the native query as query folding is off (query folding does not work with an oracle db I think only ms sql server when using native queries). I have tried using trunc in my native query but all that does is shows the time as 00:00:00 it doesn't remove it.

1 ACCEPTED SOLUTION
SpartaBI
Community Champion
Community Champion

@akhaliq7 it's ok this way. If you have it with 00:00:00 you can use it in a date dimension table. In fact the tabular model stores it anyway as datetime, just the formatting is different. You can then change the type for readability in the table model.
As long that you have a unique row per date and that your date dimesnion will have full years and consecutive days, you will be fine


2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png


Full-Logo11.png

SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Showcase Report – Contoso By SpartaBI

View solution in original post

1 REPLY 1
SpartaBI
Community Champion
Community Champion

@akhaliq7 it's ok this way. If you have it with 00:00:00 you can use it in a date dimension table. In fact the tabular model stores it anyway as datetime, just the formatting is different. You can then change the type for readability in the table model.
As long that you have a unique row per date and that your date dimesnion will have full years and consecutive days, you will be fine


2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png


Full-Logo11.png

SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Showcase Report – Contoso By SpartaBI

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.