Last Modified Date: 09 Dec 2022
Environment
- Tableau Desktop
- SAP HANA calculation view
Resolution
As a workaround, try to emulate the different tables that make up the SAP HANA calculation view inside different Tableau extracts. The goal would be to have one extract that contains only fields from the one table.To do so, please follow the steps below:
- Connect to the live data source.
- Create the view.
- Click "Hide all unused fields" from the drop-down on the Data pane menu. For more information, see Hide or Unhide Fields.
- Create an extract by right-clicking the data source and selecting Extract data.
- Repeat above steps for each required view.
- Combine the views on a dashboard. Each view will be based on its own extract.
Cause
If a SAP HANA calculation view is based on multiple raw tables, then mixing fields from the various tables can lead to incorrect results.Additional Information
The level of aggregation within the calculation view (e.g. what you usually would call the "GROUP BY" clause) is dynamically adjusted based on the columns a SELECT against the view contains. This is what SAP calls "non-relational" behaviour - and it is. It's not at all working like an aggregation over a sub-select.If Tableau creates an extract based on all the columns, this will have a different level of aggregation than a live-query that picks only some of the columns. This really is SAP HANA specific behaviour, and there are options to avoid this in the calculation view. Specifically, one can fix the level of aggregation by using the "keep" flag.
For details on that, this blog post (and linked examples) is a good start:
Usage of “Keep Flag”
https://blogs.sap.com/2017/08/30/usage-of-keep-flag
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Continue Searching
Knowledge Base
Community
Product Help
Training and Tutorials