Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Customizing Data in Tableau

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 16

CUSTOMIZING DATA:

NUMBER, STRING,
LOGICAL, AGGREGATE
FUNCTION

Presented by:
Rounak Kumar Mishra
A8121519004
Rishi Raaj
A8121519057
BBA LL.B.(H)
5th Semester
Tableau - Functions
 Any data analysis involves a lot of calculations. In
Tableau, the calculation editor is used to apply
calculations to the fields being analyzed. Tableau
has a number of inbuilt functions which help in
creating expressions for complex calculations.
 Following are the description of different
categories of functions.
Number Functions
String Functions
Logical Functions
Aggregate Functions
Number Functions
 These are the functions used for
numeric calculations. They only take
numbers as inputs.
 Number functions allow you to perform
computations on the data values in your
fields. Number functions can only be
used with fields that contain numerical
values.
Number Functions
 For example, you might have a field that
contains values for the variance in your
budget, titled Budget Variance. One of
those values might be -7. You can use the
ABS function to return the absolute value
of that number, and all the other numbers
in that field.
The calculation might look something like this:
ABS[Budget Variance]
Therefore, ABS(-7) = 7.
Number Functions
 Following are some examples of
important number functions.
String Functions
 String functions allow you to manipulate string
data (i.e. data made of text).
 For example, you might have a field that
contains all of your customers' first and last
names. One member might be: Jane Johnson.
You can pull the last names from all your
customers into a new field using a string
function.
The calculation might look something like this:
SPLIT([Customer Name], ' ', 2)
Therefore, SPLIT('Jane Johnson' , ' ', 2) = 'Johnson'.
String Functions
 Following are some important string
functions with examples
Logical Functions
 These functions evaluate some single value or
the result of an expression and produce a
boolean output.
 Logical calculations allow you to determine if a
certain condition is true or false (boolean logic).
For example, you might want to quickly see if
sales for each country you distribute your
merchandise to were above or below a certain
threshold.
The logical calculation might look something like this:
SUM(Sales) > 1,000,000
Logical Functions
Aggregate Functions
 Aggregate functions allow you to summarize
or change the granularity of your data.
 For example, you might want to know
exactly how many orders your store had for
a particular year. You can use the COUNTD
function to summarize the exact number of
orders your company had, and then break
the visualization down by year.
The calculation might look something like this:
COUNTD(Order ID)
Aggregate Functions
 The visualization might look something
like this:
Aggregate Functions
Tableau - Calculations
 Calculated fields allow you to create new data from data that already
exists in your data source. When you create a calculated field, you
are essentially creating a new field (or column) in your data source,
the values or members of which are determined by a calculation that
you control. This new calculated field is saved to your data source in
Tableau, and can be used to create more robust visualizations. But
don't worry: your original data remains untouched.
 You can use calculated fields for many, many reasons. Some
examples might include:
To segment data
To convert the data type of a field, such as converting a string to a date.
To aggregate data
To filter results
To calculate ratios
Create a Simple Calculated Field
 Sometimes your data source does not contain a field
(or column) that you need for your analysis. For
example, your data source might contain fields with
values for Sales and Profit, but not for Profit Ratio. If
this is the case, you can create a calculated field for
Profit Ratio using data from the Sales and Profit fields.
 Step 1: Create the calculated field
In a worksheet in Tableau, select Analysis > Create
Calculated Field.
In the Calculation Editor that opens, give the calculated field
a name.
In this example, the calculated field is called Profit Ratio.
Create a Simple Calculated Field
 Step 2: Enter a formula
In the Calculation Editor, enter a formula.
This example uses the following formula:
SUM([Profit])/SUM([Sales])
Formulas use a combination of functions, fields, and
operators. To learn more about creating formulas in
Tableau.
When finished, click OK.
 The new calculated field is added to the Data
pane. If the new field computes quantitative data, it
is added to Measures. If it computes qualitative
data, it is added to Dimensions.
Thanking
You

You might also like