Function syntax

It is very helpful to click through the list of functions even just to see what the syntax is and to see some examples.

In general, functions have to be used with parentheses. The items inside parentheses are the values that the function expects when you use them. These are called arguments.

Function syntax

If the syntax for a specific function shows an argument enclosed in square brackets, it means that that specific argument is optional, that is, it is not a syntax error if you do not have to pass the value for it.

Note

A list of Tableau functions can be found at: http://bit.ly/tableau_fxns

In the following screenshot, you can see the function syntax for DATEDIFF. The first argument, date_part, is a common value you will need to supply for a number of date-related functions:

Function syntax

As the DATEDIFF example illustrates in the aforementioned screenshot, if a constant date needs to be used, they need to be enclosed in # (hash or pound) signs.

The Tableau website lists the date_part values. You can also access them from http://bit.ly/date_part.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.178.237