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
Narukkp
Helper V
Helper V

Unable to do the Incremental refresh with ODBC or denodo connector in Power BI

Hi Team,

My source is Denodo, Now i am trying to set a incremental refresh using denodo and ODBC connector but when iam  trying set the incremental refresh for my table in power bi , it is not taking the parameters values and it is loading all data instead of specified parameters data values. What i observe is my denodo table having data format like YYYY-MM-DD HH-MM-SS but  as per my understand our power query dateparameter will work if data is having MM/DD/YYYY format . 

Please let me know if any one having idea how to convert RangeStart and RangeEnd parameters to YYYY-MM_DD HH:MM:SS using M-query functions.  Below is the my sample code
let
Source = Denodo.Contents("AdvDATAMART_PROD", null),
Adv_Database = Source{[Name="AdworksDW",Kind="Database"]}[Data],
Adv_Schema = Adv_Database{[Name="AdwrorksDW",Kind="Schema"]}[Data],
#"Run Native Query" = Value.NativeQuery( Adv_Database ,"SELECT * from ""Fact_Customer_Survey""",null,[EnableFolding=true]),
#"Filtered Rows" = Table.SelectRows(#"Run Native Query", each [Response_Dt] >= RangeStart and [Response_Dt] < RangeEnd )

in
#"Filtered Rows"

1 ACCEPTED SOLUTION

Hi @lbendlin ,
If i am using Date.From it is not filtering based on RangeStart and RangeEnd filter. I got the solution i have used my query like below 
"SELECT * from ""Fact_Customer_Survey"" WHERE
""Response_Dt"" >= '" & DateTime.ToText(RangeStart, "yyyy-MM-dd hh:mm:ss") & "' and ""Response_Dt"" < '" & DateTime.ToText(RangeEnd, "yyyy-MM-dd hh:mm:ss") & "'"

It is working as expected now and it is allowing me to setup the incremental refresh. 

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

It's the other way round. Use 

 

each DateTime.From([Response_Dt]) >= RangeStart and DateTime.From([Response_Dt]) < RangeEnd

Hi @lbendlin ,
If i am using Date.From it is not filtering based on RangeStart and RangeEnd filter. I got the solution i have used my query like below 
"SELECT * from ""Fact_Customer_Survey"" WHERE
""Response_Dt"" >= '" & DateTime.ToText(RangeStart, "yyyy-MM-dd hh:mm:ss") & "' and ""Response_Dt"" < '" & DateTime.ToText(RangeEnd, "yyyy-MM-dd hh:mm:ss") & "'"

It is working as expected now and it is allowing me to setup the incremental refresh. 

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.