Tableau Formulas
Tableau Formulas
DE OTZOLOTEPEC
PROGRAMMING SYSTEMS
Group: 3211-B
TABLEAU Formulas.
Tableau is a data analysis and visualization tool that offers a wide range of
functions and formulas to perform calculations and transformations on
data.
Some of its formulas are:
• SUM: Calculates the sum of a numeric field in the data. For example,
SUM([Sales]) returns the sum of the values in the "Sales" column.
• AVG: Calculates the average of a numeric field in the data. For
example, AVG([Sales]) returns the average of the values in the "Sales"
column.
• MIN: Find the minimum value in a numeric field. For example,
MIN([Sales]) returns the minimum value in the "Sales" column.
• MAX: Find the maximum value in a numeric field. For example,
MAX([Sales]) returns the maximum value in the "Sales" column.
• COUNT: Counts the number of records in the data. For example,
COUNT([ID]) counts the number of distinct values in the "ID" column.
• IF: Evaluates a condition and returns a value if the condition is true and
another value if it is not true. For example, IF([Sales]>1000, "High",
"Low") returns "High" if the value in the "Sales" column is greater than
1000, and "Low" if it is not.
• AND/OR: Allows you to combine multiple conditions in one formula.
For example, IF([Sales]>1000 AND [Profit]>500, "Pass", "Fails")
evaluates whether both the value in the "Sales" column is greater than
1000 and the value in the "Profit" column. is greater than 500.
• DATE: Allows you to work with dates and perform calculations based
on them. For example, DATEPART('year', [Date]) returns the year
corresponding to the date in the "Date" column.
• DATEDIFF: Calculates the difference between two dates in a specified
unit of time. For example, DATEDIFF('day', [Start Date], [End Date])
calculates the difference in days between the dates in the "Start Date"
and "End Date" columns.
• WINDOW_SUM: Performs a cumulative sum or a sum on a specified
window of data. For example, WINDOW_SUM(SUM([Sales]))
calculates the cumulative sum of the values in the "Sales" column.
Tableau offers many more features and possibilities to perform calculations
and transformations on the data, depending on your specific needs.