Вы находитесь на странице: 1из 16

Session 5

Hierarchies
• Add Superstore data. Drag order sheet in the workspace.
• Open new worksheet and name it Hierarchy.
• Under the dimension space drag sub category variable over product
variable. A message box appears put the name as Product.
• then drag sub category and put over product.
• Look at the symbol at the right, a hierarchical symbol.
• Put product hierarchy in the column tab and sales in the row tab.
• Look at the plus sign, click and see how it drills down.
Time hierarchy
• Open new sheet by name time.
• Put order date in column and sales in row. Observe the plus sign it
shows year. Keep on clicking on the plus sign and see what happens.
• Now click (white triangle shape) on the first blue pill by name of year.
• A dot is visible in front of year. Go to the year at the bottom.
• The year pill changes to green. When you click on plus sign now it
does not result in multiple pills, changes happen in the same pill.
• Which format looks more meaningful?
Creating Sets
• The members of a dynamic set change when the underlying data
changes. Dynamic sets can only be based on a single dimension.
• It is basically subset of data based on some conditions.

• Click a variable under dimensions, right-click and select Create > Set.
• Let us right click on state. Name it as highest selling 5 states.
• Put the set in columns and sales in rows. Two groups IN and OUT.
Example 2
• Open new sheet name as set 2.
• Put sub category in column and sales in rows. The variable may not be
visible you can put the product hierarchy in column, Drill down remove
everything other than the sub category or go to the hierarchy and say
remove hierarchy.
• We gat a bar chart. Click the descending button just below Format tab.
• Select the below 10 categories by sales. Right click and we get a set option.
If you click on the option of filter shelf option it gets added to the filter
pane.
• Drag the new set in column and sales in rows. We get two bars. If not
getting two bars remove the set from filters pane.
• Click on the set in the column and show members in the set.
• Similarly a scatter plot can be used to create a set.
Parameters
• A Parameter is any value passed to a program in order to customize
the program for a particular purpose.
• A parameter could be anything: A string of text, a range of values, or
an amount just to name a few.
• In Tableau, think about it like this; you need to have something for
your visualization that is not exactly in your data.
• A parameter will allow you to provide a value to pass into Tableau.
• Parameters allow you to come up with scenarios or options that are
not available in your data and create these values to put into your
visualization.
Parameters- creation
• Open new worksheet name as parameter.
• Put sub categories in row and sales in column we get a bar chart. Put
in an ascending or descending order.
• Take the sub category and put it in filters, a dialogue box opens.
• Go to top tab. Click on field. And this time click on create a parameter.
a new dialogue box appears, give name as TOP N. Select create a
parameter and a new dialogue appears. current number is 10 but go
below and say a maximum number as 12 say.
• Right side on the worksheet I get a parameter control. And a slider
slide and see what happens.
Make a similar parameter for states let us say we call it top 5 states.
Make a new sheet by name of top 5 states.
Parameters with sets
• Open new sheet name it parameter with sets. Send sales to column and
sub category to rows. And filter in descending order.

• Go to sub category and click on the drop down -> create -> set. Give it
name set 2.
• Go to top tab and select the parameter TOP N.
• Go to parameter tab in data pane click and say show parameter control.
• Put set 2 on the colour marks card. Sum are blue and some are greyed out.
• This is a useful method for colouring top N sales.
Joins in Tableau
Different types of the JOINs in SQL:
• (INNER) JOIN: Returns records that have matching values in both tables

• LEFT (OUTER) JOIN: Return all records from the left table, and the matched
records from the right table
Join will impact null and empty cells
• RIGHT (OUTER) JOIN: Return all records from the right table, and the
matched records from the left table

• FULL (OUTER) JOIN: Return all records when there is a match in either left
or right table
Join in Tableau
• Open new tableau workbook and get the CO2 data.
• Drag CO2 per capita pivoted and CO2 (kt) pivoted. In to the drag sheet
area.
• Data of both sheets is lined up next to each other. Columns are
adjacent.
• Some columns are repeated. Hide the repeated columns.
• Click on the joint created. Year is used to match data. Add country
also. Add below year country on both side of =.
• You can vary the joints and see what happens.
Unions
• Union is appending or stacking.
• Drag CO2(kt) pivoted and put the variable CO2 (kt) for split on top of
it.
• See it shows table names and it matches up the columns
automatically.
• Try now for CO2(kt) pivoted and CO2 per capita pivoted.
Groupings
Simplifies large numbers of dimension members by combining them
into higher-level categories.
• Open a new Tableu workbook and attach data Global super store.xls
• Open sheet name as groups.
• Put Market variable in rows. Sales in columns.
• Within the sheet click on the header where Africa is written, every
thing turns grey. Then press control and click to choose APAC.
• Right click and choose group, a spiral type symbol.
• Remove market group and bring market in columns.
Create groups from the variable itself.
• Open new worksheet name it sub category.
• Sub category in rows and sales in column.
• Then click on the sub category field ( drill down using the arrow) ->
create -> group.
• A dialogue box appears. Name it sub category. Select and 5 elements.
• Give it some name other appliances.
Hierarchies with groups
• Create sheet hierarchy.
• Create hierarchy with category and sub category and name it
products.
• Drag sub category group and drop in product hierarchy. Add it after
category.

Вам также может понравиться