What is the use of the ISDATE statement in tableau

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

Recipe Objective:-What is the use of the ISDATE 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. Click on the drop-down available at the top right corner under the dimensions.

Step 4:-

Click on the Create Calculated Field option, a window named Calculation1 will appear. The ISDATE statement works as true or false. It is true if a date value is provided; otherwise, it is false.

Market Basket Analysis Project in Python with Real World Example

Step 5:-

Go to the window of Calculation1; type ISDATE[Country]. As the country is a string data type, it will only consist of the names of countries so that the ISDATE statement will return false; click on apply and ok.

Step 6:-

A new field Calculation1 will appear in the dimensions, double-click for it to appear on the row shelf, and display false since the country is a string data type. We can drag and drop the Country dimension on the row shelf for all the country names to appear under the country dimension, and Calculation1 will display false for all. All this data will be available in table form.

Step 7:-

Another example is to click on the top right corner drop-down and select Create Calculated Field. A new window named Calculation2 is displayed. Type ISDATE("2011-04-01")=True. The Date format used here is "YYYY-MM-DD". Click on Apply and Ok.

Step 8:-

Since the Date is provided in the ISDATE statement in tableau, it will display True, and a new field named Calculation2 will appear in the dimensions.

Step 9:-

Double click on Calculation2 for it to appear on the row shelf and drag and drop the Order Date dimension in the column shelf. We can swap it for simplicity. All this data will be displayed in table form. We can observe true under Calculation2. We can drill down the year to the M-D-Y form and thus check the date provided in the statement, "2011-04-01" (1 April 2011).

What Users are saying..

profile image

Anand Kumpatla

Sr Data Scientist @ Doubleslash Software Solutions Pvt Ltd
linkedin profile url

ProjectPro is a unique platform and helps many people in the industry to solve real-life problems with a step-by-step walkthrough of projects. A platform with some fantastic resources to gain... Read More

Relevant Projects

Census Income Data Set Project-Predict Adult Census Income
Use the Adult Income dataset to predict whether income exceeds 50K yr based oncensus data.

NLP Project for Multi Class Text Classification using BERT Model
In this NLP Project, you will learn how to build a multi-class text classification model using using the pre-trained BERT model.

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.

Learn to Build a Neural network from Scratch using NumPy
In this deep learning project, you will learn to build a neural network from scratch using NumPy

MLOps Project for a Mask R-CNN on GCP using uWSGI Flask
MLOps on GCP - Solved end-to-end MLOps Project to deploy a Mask RCNN Model for Image Segmentation as a Web Application using uWSGI Flask, Docker, and TensorFlow.

Deep Learning Project for Time Series Forecasting in Python
Deep Learning for Time Series Forecasting in Python -A Hands-On Approach to Build Deep Learning Models (MLP, CNN, LSTM, and a Hybrid Model CNN-LSTM) on Time Series Data.

Deep Learning Project for Text Detection in Images using Python
CV2 Text Detection Code for Images using Python -Build a CRNN deep learning model to predict the single-line text in a given image.

Skip Gram Model Python Implementation for Word Embeddings
Skip-Gram Model word2vec Example -Learn how to implement the skip gram algorithm in NLP for word embeddings on a set of documents.

Learn How to Build a Linear Regression Model in PyTorch
In this Machine Learning Project, you will learn how to build a simple linear regression model in PyTorch to predict the number of days subscribed.

Predictive Analytics Project for Working Capital Optimization
In this Predictive Analytics Project, you will build a model to accurately forecast the timing of customer and supplier payments for optimizing working capital.