Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

SAP BW Import DATE as Text

Hi All, 

I'm working with SAP BW as a data source on a new project. I'm importing field formated as DATS in SAP BW but I comes as a text in PQ instead of Date. When I change it to Date in Power Query, Native Query is disabled. I will be using Incremental refresh so I have to avoid that and be able to bring the date field formated as "date". Has anyone faced a similar challenge? Thanks.

2 Replies

  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi Anonymous 

     

    Is that column in Text data type in SAP BW? If so, it is recommended to convert it into Date/time type in the data source or add another column which is in Date/time (or integer data type) in the data source. In Power Query Editor, the "change type" step doesn't support query folding, so it will make the Native Query disabled.

     

    Below description is extracted from the document about incremental refresh

     

    Date column - The table must contain a date column of date/time or integer data type. The RangeStart and RangeEnd parameters (which must be date/time data type) filter table data based on the date column. For date columns of integer surrogate keys in the form of yyyymmdd, you can create a function that converts the date/time value in the RangeStart and RangeEnd parameters to match the integer surrogate keys of the date column. To learn more, see Configure incremental refresh - Convert DateTime to integer.

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.

  • Anonymous's avatar
    Anonymous
    Not applicable

    The Date field is formated as DATS in SAP BW. The problem is when I import it into Power BI. It comes as text. The question is, how can i change the format back to Date without breaking query folding.