Tableau - How to replace null with blank or zero using ISNULL function || ISNULL function explained

preview_player
Показать описание
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
Рекомендации по теме
Комментарии
Автор

All your videos are very helpful.I am watching all.Continue the good work.Keep posting more content.

BhujithKumar
Автор

Thank you for the video. can you please do for dates also for replacing null values

krishnavenigunturu
Автор

Thanks for upload, I'm ur follower for ur good content videos, keep adding more

superstarstory
Автор

Replacing Null value for text is easiest compare to dates. The easiest to get Null for text data is highlighting the Null value and right click and select "Alias". Replace the Null value for text data in the alias with a space and ok. It removes all Null for that text data.

jenkinsmacedo