KNOWLEDGE BASE

Concatenating Oracle Calculated Fields with IF ISNULL() Returns Nulls on Extract Refresh


Published: 17 Nov 2016
Last Modified Date: 13 Oct 2022

Issue

When refreshing an Oracle extract with a calculated field containing IF ISNULL() THEN ""  or IFNULL()...etc, in Tableau Desktop, nulls return.

Environment

  • Tableau Desktop
  • Oracle

Resolution

replace ISNULLS or IFNULLS with a RAWSQL_STR() function:

For example, replace

IFNULL([STR1],"") + IFNULL([STR2],"")

with

RAWSQL_STR("%1||%2",[STR1],[STR2])

Cause

Oracle interprets blank strings as nulls automatically, so with every refresh it re-casts the blanks that the calculated field is creating as nulls again.
Did this article resolve the issue?