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.
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:
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...