When using a live connection to a SAP HANA view, the values of aggregate measures in queries are incorrect; however such query results are correct when using an extract connection.
When Hana processes SQL queries for a Calculation View that is built using an Aggregation node it may perform computations using aggregate values, where under normal SQL semantics detailed values would be used. For example, for a calculated field defined in Tableau as price*quantity, the calculation performed by Hana may be SUM(price)*SUM(quantity) instead of SUM(price*quantity).
Calculation Views reside in the schema "_SYS_BIC".
With log level “debug” or higher, when Tableau connects to a calculation view it will log a line with the following message: "HanaConnection::CheckAnalyticView: Detected an analytic view of type CALC"
This behavior is dictated by the configuration of the view in Hana Studio. If it is a Calculation view that includes an Aggregation node, modify the view in Hana Studio by enabling the "Keep Flag" for all columns in the Aggregation node that are part of the data's primary key. This will cause Hana to process queries with a level of detail that includes these columns.
If modifying the view is not viable, try one of the following workarounds:
Use an extract instead of live connection, being sure to include all dimensions that are part of the data's primary key.
Avoid using SAP HANA Views as a data source. Instead, use the original table that the View was created from.
(Please note that this third workaround may have an impact on performance)
The aggregation behavior can be circumvented by doing a “SELECT *” on the View. This can be done with a Custom SQL data connection (as opposed to direct connection to a View). For example:
001472896

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.