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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
IvanKostov
Frequent Visitor

How to avoid having date and date/time column (Incremental Refresh and Calendar Table)

Hello,

 

I am currently building a data model, where I have various date/time columns.  In this regard I found that according to best practices I should have a calendar table. Since I don't need the times I simply converted the date/time columns in PowerQuery to date columns and the issue was resolved. However, since I also want to have an incremental refresh on the table I need a date/time column.

 

What are the best practices in such scenarios? Do you always need a date column and a date/time column or there are some workarounds?

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @IvanKostov ,

 

If you need a date column (calendar relationship) and you need a datetime column (incremental refresh) then you need a date column and a datetime column, no way around that I'm afraid.

In Power Query, keep your datetime column as-is, then create a new custom column using the following:

Date.From([datetimeColumn])

Using Date.From will prevent query folding from breaking if your source is foldable.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

2 REPLIES 2
IvanKostov
Frequent Visitor

Thanks Pete! 

BA_Pete
Super User
Super User

Hi @IvanKostov ,

 

If you need a date column (calendar relationship) and you need a datetime column (incremental refresh) then you need a date column and a datetime column, no way around that I'm afraid.

In Power Query, keep your datetime column as-is, then create a new custom column using the following:

Date.From([datetimeColumn])

Using Date.From will prevent query folding from breaking if your source is foldable.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors
Top Kudoed Authors