Nowadays, almost every company uses at least one data analytics tool to analyze the data to better understand customer purchasing behavior, sentiments, etc. Such information is very crucial for business growth and planning.

Tableau is a leading data analytics tool that can handle millions of rows of data with alleviation. I’ve been building dashboards on Tableau for a few weeks now. Different types of visualization can be created with a large amount of data without affecting the performance of the dashboards. Recently I’ve learned a few Tableau inbuilt functions that can use to manipulate the data.

Below are my top 15 functions that one must know while working on Tableau:


The CEILING() function rounds a number to the nearest integer with equal or greater values.

Syntax: CEILING(number)

Example: CEILING(4.123) = 5


The Floor() function rounds a number to the nearest integer with equal or lesser values.

Syntax: Floor(number)

Example: Floor(4.123) = 4


The CONTAINS() function returns true if the given string contains the specified substring.

Syntax: CONTAINS(string, substring)

Example: CONTAINS("Salesforce", "force") = true


The SPLIT() function returns a substring from a string, using a delimiter character to divide the string into a sequence of tokens.

Syntax: SPLIT(string, delimiter, token number)

Example: SPLIT('red;green;blue;yellow', ';', 2) = 'green'

SPLIT('red/green/blue/yellow', '/', -2) = 'blue'


The AVG() function returns the average of all the values in the expression. AVG can be used with numeric fields only; Null values are ignored.

Syntax: AVG(expression)


The ATTR() function returns the value of the expression if it has a single value for all rows else returns an asterisk. Null values are ignored.

Syntax: ATTR(expression)


The TRIM() function returns the string by removing the leading and trailing spaces.

Syntax: TRIM(string)

Example: TRIM(" Tableau ") = "Tableau"


The ZN() function returns the default values if it is not null; otherwise, it returns zeros.

Syntax: ZN(number)


The DATEADD() function returns the specified date with a specified number of intervals added to the date_part of that date. For example, adding two months or 15 days to a date.

Syntax: DATEADD(date_part, interval, date)

Example: DATEADD('month', 2, [close date]) { It will push all close dates by two months.}

DATEADD('day', 15, [close date]) { It will push all close dates by 15 days.}


The DATEPART() function returns date_part of date as an integer.

Syntax: DATEPART(date_part, date, [start_of_week])

Example: DATEPART('month', #2022-10-06#) = 6

DATEPART('Year', #2022-10-06#) = 2022


The DATETRUNC() function truncates the date to the accuracy specified by the date_part and returns a new date. If a date is truncated at the month level and is in the middle of the month. The DATETRUNC function returns the date with the first day of the month.

Syntax: DATETRUNC(date_part, date, [start_of_week])

Example: DATETRUNC('month', #22-09-2022#) = #01-09-2022#


The CASE() function finds the first value that matches expression and returns the corresponding value.



The REPLACE() function searches substring in the string and replaces it with the replacement. The string will not change if the substring is not found.

Syntax: REPLACE(string, substring, replacement)

Example: REPLACE("Thank You;", ";", " for reading!") = "Thank You for reading!”


The UPPER() function returns string, with all characters in uppercase.

Syntax: UPPER(string)

Example: UPPER("Salesforce") = "SALESFORCE"


The LOWER() function returns string, with all characters in lowercase.

Syntax: LOWER(string)

Example: LOWER("TABLEAU") = "tableau"


Number functions can only use to perform computations on the data values in the fields that contain numerical values.

I hope you find this article helpful. What is your favorite Tableau function? Share in the comment.

Join our newsletter.

No spam, just learning!

Continue Reading

Get a free consultation.

Call us today at (469) 790-0063

Schedule a Consultation

Leave a Reply