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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Marc-Alexis
Frequent Visitor

incremental refresh based on a dates stored with the YYYYMMDD INT format

Hello everyone,

I am trying to activate the incremental refresh on a table “FMT_Reporting_V2V_GuestHistoryDaily”  based on a dates saved in a column “Revenue date” in the format YYYYMMDD as whole numbers, stored and imported from a MySQL database with the INT format YYYYMMDD.

I have set RangeStart as following:

  • Type: Date/Time
  • Required: unchecked
  • Suggested Values: Any value
  • Current value: 01/01/2017 00:00:00

And RangeEnd as following:

  • Type: Date/Time
  • Required: unchecked
  • Suggested Values: Any value
  • Current value: 12/12/2050 00:00:00

Here is my current query:

let

    Source = MySQL.Database("10.203.1.116", "FMT_Reporting", [ReturnSingleDatabase=true]),

    FMT_Reporting_V2V_GuestHistoryDaily = Source{[Schema="FMT_Reporting",Item="V2V_GuestHistoryDaily"]}[Data],

    #"Filtered Rows" = Table.SelectRows(#"FMT_Reporting_V2V_GuestHistoryDaily", each each [Revenue date] >= Date.Year(RangeStart)*10000+Date.Month(RangeStart)*100+Date.Day(RangeStart) and [Revenue date] <= Date.Year(RangeEnd)*10000+Date.Month(RangeEnd)*100+Date.Day(RangeEnd)),

    #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Rev_Room_Net_LC", "Rev_FB_Net_LC", "Rev_BQT_Net_LC", "Rev_SPA_Net_LC", "Rev_Ski_Net_LC", "Rev_Other_Net_LC"})

in

    #"Removed Columns"

When trying to apply the query I get into the following error message:

Apply query changes

FMT_Reporting V2V_GuestHistoryDaily

Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error: [Expression.Error] We cannot convert a value of type Function to type Logical.. '.

 

Any idea on what needs to be changed?

Thanks for you help!

1 ACCEPTED SOLUTION
v-xuding-msft
Community Support
Community Support

Hi @Marc-Alexis ,

 

In the step of "Filtered Rows", there is an extra "each". Please remove it to have a try.

 

= Table.SelectRows(#"FMT_Reporting_V2V_GuestHistoryDaily", each [Revenue date] >= Date.Year(RangeStart)*10000+Date.Month(RangeStart)*100+Date.Day(RangeStart) and [Revenue date] <= Date.Year(RangeEnd)*10000+Date.Month(RangeEnd)*100+Date.Day(RangeEnd))

 

 

 

let

    Source = MySQL.Database("10.203.1.116", "FMT_Reporting", [ReturnSingleDatabase=true]),

    FMT_Reporting_V2V_GuestHistoryDaily = Source{[Schema="FMT_Reporting",Item="V2V_GuestHistoryDaily"]}[Data],

    #"Filtered Rows" = Table.SelectRows(#"FMT_Reporting_V2V_GuestHistoryDaily", each [Revenue date] >= Date.Year(RangeStart)*10000+Date.Month(RangeStart)*100+Date.Day(RangeStart) and [Revenue date] <= Date.Year(RangeEnd)*10000+Date.Month(RangeEnd)*100+Date.Day(RangeEnd)),

    #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Rev_Room_Net_LC", "Rev_FB_Net_LC", "Rev_BQT_Net_LC", "Rev_SPA_Net_LC", "Rev_Ski_Net_LC", "Rev_Other_Net_LC"})

in

    #"Removed Columns"

 

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-xuding-msft
Community Support
Community Support

Hi @Marc-Alexis ,

 

In the step of "Filtered Rows", there is an extra "each". Please remove it to have a try.

 

= Table.SelectRows(#"FMT_Reporting_V2V_GuestHistoryDaily", each [Revenue date] >= Date.Year(RangeStart)*10000+Date.Month(RangeStart)*100+Date.Day(RangeStart) and [Revenue date] <= Date.Year(RangeEnd)*10000+Date.Month(RangeEnd)*100+Date.Day(RangeEnd))

 

 

 

let

    Source = MySQL.Database("10.203.1.116", "FMT_Reporting", [ReturnSingleDatabase=true]),

    FMT_Reporting_V2V_GuestHistoryDaily = Source{[Schema="FMT_Reporting",Item="V2V_GuestHistoryDaily"]}[Data],

    #"Filtered Rows" = Table.SelectRows(#"FMT_Reporting_V2V_GuestHistoryDaily", each [Revenue date] >= Date.Year(RangeStart)*10000+Date.Month(RangeStart)*100+Date.Day(RangeStart) and [Revenue date] <= Date.Year(RangeEnd)*10000+Date.Month(RangeEnd)*100+Date.Day(RangeEnd)),

    #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Rev_Room_Net_LC", "Rev_FB_Net_LC", "Rev_BQT_Net_LC", "Rev_SPA_Net_LC", "Rev_Ski_Net_LC", "Rev_Other_Net_LC"})

in

    #"Removed Columns"

 

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Xue! Thanks for this. It was indeed the issue. Aprreciated!

amitchandak
Super User
Super User

@Marc-Alexis , refer if these can help

https://docs.microsoft.com/en-us/power-bi/connect-data/refresh-troubleshooting-refresh-scenarios

https://data-flair.training/blogs/power-bi-troubleshooting/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors