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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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