What is the use of the IFNULL statement in tableau

This recipe explains what is the use of the IFNULL statement in tableau

Recipe Objective:-What is the use of the IFNULL statement in tableau?

Step 1:-

Import any data set in the data source. For example, here, the "Global Superstore" data set excel file is imported.

Step 2:-

Drag and drop the orders sheet in the schema pane.

Step 3:-

Go to sheet1; here, different dimensions and measures are available. Here we have used the IFNULL statement. We will replace the "Null values" with zero's (0) with the help of the IFNULL statement.

Learn About the Application of ARCH and GARCH models in Real-World

Step 4:-

Go to the Postal Code dimension and click on the drop-down available. Then click on the create-calculated field, a window will appear named Calculation1, by default. We can rename it as per our requirement. Here the default name Calculation1 is kept as it is.

Step 5:-

Go to the window where [Postal Code] is by default shown. Type IFNULL in front of [Postal Code]. We can use the tab button so that the IFNULL statement appears.

Step 6:-

Then type the statement as- IFNULL [Postal Code,0] Click on Apply and Ok.

Step 7:-

As per the IFNULL statement in tableau, we will replace Null values with zero's (0).

Step 8:-

A new field Calculation1 will create under the measures as it consists of a number, now drag and drop City dimension and Postal Code dimension in the row shelf. Here we can observe some cities with Postal Code and some without Postal Code; they have Null values, thus replacing them with zero (0).

Step 9:-

Now click on the drop-down available at the Calculation1 under the measures. Click on convert to discrete. Then drag and drop the Calculation1 in the row shelf, so the fields with Null values in Postal Code will get converted to zero (0), which will appear under the Calculation1 as the IFNULL statement is applied.

What Users are saying..

profile image

Abhinav Agarwal

Graduate Student at Northwestern University
linkedin profile url

I come from Northwestern University, which is ranked 9th in the US. Although the high-quality academics at school taught me all the basics I needed, obtaining practical experience was a challenge.... Read More

Relevant Projects

Build a Customer Churn Prediction Model using Decision Trees
Develop a customer churn prediction model using decision tree machine learning algorithms and data science on streaming service data.

Isolation Forest Model and LOF for Anomaly Detection in Python
Credit Card Fraud Detection Project - Build an Isolation Forest Model and Local Outlier Factor (LOF) in Python to identify fraudulent credit card transactions.

OpenCV Project to Master Advanced Computer Vision Concepts
In this OpenCV project, you will learn to implement advanced computer vision concepts and algorithms in OpenCV library using Python.

Customer Market Basket Analysis using Apriori and Fpgrowth algorithms
In this data science project, you will learn how to perform market basket analysis with the application of Apriori and FP growth algorithms based on the concept of association rule learning.

Ecommerce product reviews - Pairwise ranking and sentiment analysis
This project analyzes a dataset containing ecommerce product reviews. The goal is to use machine learning models to perform sentiment analysis on product reviews and rank them based on relevance. Reviews play a key role in product recommendation systems.

Linear Regression Model Project in Python for Beginners Part 2
Machine Learning Linear Regression Project for Beginners in Python to Build a Multiple Linear Regression Model on Soccer Player Dataset.

Recommender System Machine Learning Project for Beginners-3
Content Based Recommender System Project - Building a Content-Based Product Recommender App with Streamlit

Image Segmentation using Mask R-CNN with Tensorflow
In this Deep Learning Project on Image Segmentation Python, you will learn how to implement the Mask R-CNN model for early fire detection.

PyTorch Project to Build a GAN Model on MNIST Dataset
In this deep learning project, you will learn how to build a GAN Model on MNIST Dataset for generating new images of handwritten digits.

Azure Text Analytics for Medical Search Engine Deployment
Microsoft Azure Project - Use Azure text analytics cognitive service to deploy a machine learning model into Azure Databricks