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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
CrhIT
Frequent Visitor

Error trying to do an incremental refresh with DateTime data type

Hello,

I'm trying to do an incremental refresh on my DataFlow Gen2. I'm using a column that is DateTime format. So what I do is sort descending the date column, then create make a drill down for the first value of it [0]. 

 

This new query is then used to filter the data in the first query, so that only the new values are append into the data base.

 

This is the database soreted desciding by DateTime

CrhIT_0-1718032719908.png

 

This is the data drilled down, that gets the most recent value of DateTime

CrhIT_1-1718032833389.png

 

This is the dataflow that I is trying to be perform

 

CrhIT_0-1718034916238.png

 

But in the dataflow twhen I filter for that query I don't have any issues:

CrhIT_1-1718035053320.png

 

But when I try to run the dataflow or Publish it, then the error 'We cannot apply operator < to types Table and DateTime' appears but, the data drill down is the same that the origin.

 

Any solution for this incremental refresh?

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

So what I do is sort descending the date column

Sorting operations in Power Query are very likely to break folding. Avoid at all cost.

 

Incremental Refresh in Dataflows is fully automated. You are not allowed to provide your own filter statement. All you can do is indicate the datetime column that should be used.  The Power BI service then adds the required M code at the end (!!!) .

 

Using incremental refresh with dataflows - Power Query | Microsoft Learn

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

So what I do is sort descending the date column

Sorting operations in Power Query are very likely to break folding. Avoid at all cost.

 

Incremental Refresh in Dataflows is fully automated. You are not allowed to provide your own filter statement. All you can do is indicate the datetime column that should be used.  The Power BI service then adds the required M code at the end (!!!) .

 

Using incremental refresh with dataflows - Power Query | Microsoft Learn

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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