cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jribs
Helper I
Helper I

SAP BW, Dates as Text, and Incremental Refresh

SAP BW (non-HANA) and Incrementally Refreshing has been giving me a lot of trouble for the past few months. On a positive note it has taught quite a lot.

 

Here is the issue:

  • In order to incrementally refresh, query folding must be enabled
  • When importing from SAP BW, ALL fields come across as text, so I can't apply incremental refresh here
  • As soon as I convert a date field in the format mm/dd/yyyy, query folding is no longer possible, making incremental refresh no longer work

Things I have tried:

  • Ensuring autodetect data types is enabled
  • Ensuring I am on SAP BW connector v2.0

Has anyone found a way to get incremental refresh working on SAP BW or get the dates to auto-format from either the SAP BW or Power BI side? 

 

Here are some screenshots of what I am talking about:

 

After selecting the query from infoprovider (notice yellow cube, making query folding possible)

jribs_1-1620048509041.png

After converting to Date/Time (yellow cube disappears)

jribs_2-1620048568235.png

 

Here is a similar issue posted on the forum without a resolution posted, but it was some time ago

 

Any help or suggestions would be greatly appreciated

4 REPLIES 4
edhans
Super User
Super User

Unless someone has better knowledge on this, I don't think this will be possible using a table. I tried using SQL Server to convert a text based date "01/01/2020" to an integer based date - 20200101 - which you can use in Incremental Refresh. However, while I can get the text to work, converting to a number breaks folding, just like converting text to a date does. 

 

Number.From(Text.End([TextDate], 4))

This was the code just to get the year to a number. I didn't bother with the rest as that broke folding.

 

I think the best approach here is to work with your DBA and create a view of the table that converts the text date to a true date, then use that for incremental refresh instead of connecting to the table. 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Agreed. I wish I was working with SQL so it was a bit more straight forward. But I'm not sure how it is done in SAP BW or if it is even working. Hoping someone who worked with SAP BW can help out

Icey
Community Support
Community Support

Hi @jribs ,

 

I'm curious if this methond, creating a function that converts the date/time value in the parameters to match the text surrogate key of the data source table, could work in your scenario. 🤔

 

 

Best Regards,

Icey

 

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

Icey
Community Support
Community Support

Hi @jribs ,

 

There is a scenario of "date columns of integer surrogate keys in the form of yyyymmdd". And based on the official document, we can create a function that converts the date/time value in the parameters to match the integer surrogate key of the data source table. For detailed steps, please refer to this document:

Configure incremental refresh for Power BI datasets - Power BI | Microsoft Docs.

 

Therefore, with reference to this method, we may also be able to achieve your needs. I don't have SAP BW, so I can't test it. Please check if it works in your scenario.

 

 

Best Regards,

Icey

 

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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Kudoed Authors