ISNULL function in Tableau:
ISNULL is a boolean function. Meaning it
returns TRUE or FALSE
SYNTAX: ISNULL(exp1)
It returns true if the exp1 is null
else returns false
Using this function lets replace null
with blanks or string
eg1: exp1 of datatype string
Replace null with NA:
---------------------
if ISNULL([Sub-cateogry])=TRUE then 'NA'
ELSE [Sub-cateogry] END
Replace null with blank:
-----------------------
if ISNULL([Sub-cateogry])=TRUE then ''
ELSE [Sub-cateogry] END
//here keeping =true is optional
eg2: exp1 of datatype int
Lets replace blank in Profit with 0
if ISNULL([Profit]) then 0
ELSE [Profit] END
29 авг 2024