Forum Discussion

CrhIT's avatar
CrhIT
Frequent Visitor
2 years ago
Solved

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

 

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

 

This is the dataflow that I is trying to be perform

 

 

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

 

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?

  • 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

1 Reply

  • 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