KNOWLEDGE BASE

Poor Performance When Using Calculation Containing IFNULL or ZN


Published: 24 Mar 2020
Last Modified Date: 25 Mar 2020

Issue

When connected to a TIBCO Data Virtualization (DV) virtual database that references a SAP HANA database, a GROUP BY clause in a query from Tableau may not being passed to HANA because of the following 'No Push Reason' (which appears in TIBCO DV): 

Cannot push selectable because the data source SAP_HANA does not support the function --ISNULL(CASE WHEN...

Because the above clause is not passed to HANA, the query that is actually sent to HANA fetches more data than required (and consumes more memory), resulting in slow performance.

Environment

  • Tableau Desktop
  • Windows
  • TIBCO Data Virtualization (formerly called Cisco Information Server)
  • SAP HANA

Resolution

To prevent ISNULL from appearing in the same SQL query clause as CASE WHEN, avoid using conditional calculations which also contain the IFNULL() function.

For example:
  1. Create calculated fields, so that there is one calculated field for each result stated in the conditional calculation.
  2. Use these new calculated fields to replace the original calculated field in separate versions of the original view. 
  3. Create a sheet selector to allow users to pick which one of the new views is shown in a dashboard.

Cause

Using the IFNULL() function in a calculation results in the ISNULL() function in the query sent to the database.
Did this article resolve the issue?