Functions syntax

There are many types of functions available in Tableau, such as Number, String, Date, and User. Different functions have different syntax and require different inputs for them to work. The list of all of the functions available to you in Tableau is available in the side tab of the calculated field window. Select AVG() from the functions list. Once you select any function, you will see three elements in the help window:

These elements are as follows:

  • Syntax of the function: For AVG, it shows AVG(expression), meaning that, to obtain the average, you need to write AVG(expression here).
  • Explanation: Below the syntax, there is an explanation of what the function does.
  • Example: This is an example of how the function can be used.
If you are unsure of how to use a function, copy and paste the example, and then replace the fields in it with your own fields. This ensures that the syntax remains correct.

You can use more than one function in a calculation and even nest them inside one another as long as they meet the syntax requirements. We will learn about some of the common types of functions later in this chapter.

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

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