Forum Discussion

lt79_Pax's avatar
lt79_Pax
Helper II
4 years ago
Solved

How to convert date to datetime for incremental refresh

Dear Power BI Representative, I have a dateset where the date key was stored as date however for an incremental refresh the format needs to be set to date/time.  When I try to change the type of the...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi lt79_Pax ,

     

    The data type of the RangeStart and RangeEnd parameters must be of date/time data type. However, for many data sources, tables don't have a column of date/time data type but instead have a date column of integer surrogate keys in the form of yyyymmdd. You can create a function that converts the date/time value in the parameters to match the integer surrogate key of the data source table. The function is then called in a filter step. This step is required if the data source table contains only a surrogate key as integer data type.

    Details: https://docs.microsoft.com/en-us/power-bi/connect-data/incremental-refresh-configure#convert-datetime-to-integer 

     

    Best Regards,

    Jay