Tableau Desktop Fundamental Tutorial 3: Simplifying and Sorting Your Data

A.  Data Filtering



Using filters narrows the data shown in a view to focus on relevant information. Filter options vary by field type (Dimension, Measure, Date Dimension). You can expose quick filters for any dimension or measure in your data, and you can create custom filters on dimensions or measures.
After you create a filter, all filtered fields display on the Filters shelf in the worksheet. Use this to identify which data is included in or excluded from the view.
1. Filter on a Dimension

Use a dimension filter to see the data values for smaller set of dimension members.

The filter dialog box for dimension has four filter option tabs: General, Wildcard, Condition, and Top. These filters are cumulative, meaning the settings you choose on each tab affect the others using “AND” logic. For examples, if you filter the Region dimension to include only West (on the General tab), and then add conditions for a Top 10 filter (On the Top tab), you see Top
10 data for the West only.

a) Built a Filter by Dimension
  • Drag a dimension to Filter
  • In the Filter dialog box, set the filter criteria and click OK.
 
2. Filter on a Measure

Use measure filters to show only the values that meet your criteria. For examples, you could apply filters foe sales that displays only the values above, below, or within a specified range, like sales greater than $500,000, sales less than $500,000 and $2,000,000.

a) Build a Filter by Measure
  • Drag the measure to the Filter shelf.
  • In the Filter Field dialog box, select the method of aggregation for the measure, and click next.
  • In the Filter dialog box, set the filter criteria and click OK:

B. Practice: Filtering

Download this file Filtering_Starter.twbx and create a view according to the following specification:
  • Has a quick filter region, displays as a single value list, titled “Select a Region” with the option to choose “All” disabled.
  • Has a quick filter on Sum or Sales, formatted as a slider, and titled “Adjust View by Sales”.

1. Direction Details
  • Create a quick filter region, displayed as a single a value list, removing the All option, and titled “Select a Region”.
  • Create a quick filter from Sum of Sales, displayed as a slider, with a range of values between $500,000 to $1,000,000, and titled “Adjust View by Sales”
  • Experiment with the sliders and notice the “AND” logic being used. The results shown are those that match the criteria of both filters.
2.  Solution
  • Download this file Filtering_Starter.twbx
  • Right click on Region in the Data window, and click Show Quick Filter
  • On Region quick filter, click the drop down arrow, and choose Single Value (List).
  • Click the drop down arrow again for the Region quick filter, select Customize, and chooseShow “All” Value to cancel the selection if it is checked.
  • Click the dropdown arrow again for the Region quick filter and choose Edit Title.
  • Name the quick filter “Select Region” and then click OK to close the dialog box.
  • Drag Sales form the Data window to the Filter shelf.
  • Select Sum as the aggregation, and then click Next.
  • Choose range of values for input, set $500,000 as the bottom and $1,000,000 as the top, and click OK.
  • Right click the SUM (Sales) filter, and choose Show Quick Filter.
  • Click the drop down arrow for the SUM (Sales) quick filter, and choose Edit Title.
  • Name the quick filter “adjust View by Sales”
  • Experiment with the sliders and notice the “AND” logic being used. The results shown are those that match the criteria of both filters.
C. Creating Date Filters

Use a date filter to filter a data subset for specific date or time criteria. You can filter date for a specific range of dates or for a discrete date/time.

1. Add a date Filter to a View
  • Drag the date field to the Filters shelf
  • Select the type of date filter you want to use
See below for more information.

2. Set a Relative Date Filter

Use a relative data filter to update data dynamically with time. For example, set your filter to show data for 3 months before or after the current date. The data shown in your view updates daily.
  • Select Relative date from the Filter Field dialog box and click Next
  • On the Filter dialog box, choose the time unit you want to use for the relatives data range.
  • Next, set the specific time to target. For example, if you choose Quarters for your unit of time, the options read Previous Quarter, This Quarter, and Next Quarter. You can also specify Last N or next N quarters, or the current quarter to date.
  • To set the filter to a specific anchor date, select Anchor relative to, and choose a date from the menu.
3. Set a Range of Dates Filter

Use the range of dates filter to specify a span of time. You can also specify a starting or ending date.
  • Drag a date field Dimensions to the Filters shelf
  • On the Filter dialog box, choose Range of dates
  • Set the specific start and end dates to target. Use the slider, or select the dates from the dropdown, menus, and click OK.
4. Set a Starting Date or Ending Date Filter
  • Select Range of Dates from the Filter Field dialog box and click next
  • On the Filter dialog box, choose Starting date or Ending date
  • Set the start date or end date, and click OK.
5. Creating Other Data Filters

Using the same steps as above, you can create filters from discrete dates and times. After you drag the date field to the Filters shelf:
  • Choose the date part you want to use as filter on the filter Field dialog box, and click Next.
  • On the filter dialog, select the members you want to use as a filter. The list is based in your selection in the first dialog box. For example, if you choose weekday, the days of the week display.
  • Click Ok.
6. Add a Quick Filter

After you create your date filter, add a quick filter so user can manipulate the data in the view.
  • Right click the field in the filter shelf, and choose Show Quick Filter. A filter displays in the view.
  • On the quick filter, click the drop down arrow and edit the appearance and function of the filter as required.
D. Shorting

Tableau has multiple methods for shorting data in views, including computed shorts and manual sorts.

1.   Computed Shorts

A computed sort sets the sort order and changes dynamically as the data changes. There are several types of computed sorts.

a) The Use a Default Sort
  • In the data window, right click the dimension to sort on
  • On the context menu, select Default Properties, and choose short
  • In the sort dialog box, choose Manual, and then use the Up and Down buttons to manually sort the dimension member.
  • Click OK. The sort order is part of the filed properties of the dimension, and can be used across worksheets in the workbook.
b) To Use Right Click Sorting in a Dimension
In the view, right click the dimension to sort
  • On the context menu choose Sort. The sort dialog box appears.
  • Set the sort order (Ascending or Descending)
  • Set the sort by option, and click OK
c) To Use One Click Sorting on an Axis
  • On the toolbar, click either the Ascending or Descending sort icon. If you however, a tooltip appears that describe how short will be performed (based on fields in the view, and current view selections)

2.   Manual Sorts

Manual Shorts are an easy way to sort data quickly, but they are not dynamic.

a) To Use Drag and Drop Sorting
  • On the view, select the headers or labels for the items you want to sort
  • Drag the selected headers or labels to re order them
b) To Sort on Selected Marks
  • On the view, select the marks for the dimension members you want to sort
  • However  until  the tooltip displays,  and then  choose  either  sort  ascending or  sort descending.

E. Practice: Sorting

Download this file Sorting_Starter.twbx and modify the view on Sheet 1 according to the following specification:

1. View One
  • Use a manual default sort for Department in this folder: Technology, Office Supplies, and Furniture.
  • Use a local sort in the view to order Category by SUM (Sales) in descending order.

2. View Two
  • Duplicate of the first worksheet, with bar color encoded by Profit.
  • Category sort edited to short by Profit in descending order.
3. Direction Details
  • On the view one tab, create a manual default sort department, with values ordered by Technology, office supplies, and then furniture.
  • On the view two tabs, sort category by SUM (Sales) in descending order.
  • On the view two tabs, edit the sort applied to category so field selected is sum of profit.
4. Solution

a) View One
  • Download this file Sorting_Starter.twbx
  • Click the view one tab
  • In the view, right click the department label, and choose sort.
  • In the sort dialog box under sort by, choose manual.
  • To set the sort order, drag and drop each field, or, select a field and use the Up and Down buttons. Order them so Technology is first, then office supplies, and the furniture, and then click OK to close the dialog box.
  • However on the sales axis, and select the sort icon to toggle between ascending and descending sort. Leave it as descending sort.
b) View Two
  • Click the view two tab
  • Right click the category label in the view, and choose sort
  • In short by, select field, then choose profit with an aggregation of sum, and click OK.






3 comments:

  1. Thanks for your blog and very good information. Keep posting.
    tableau training certification
    tableau training

    ReplyDelete
  2. Very nice article. IntelliMindz is the best IT Training in Bangalore with placement, offering 200 and more software courses with 100% Placement Assistance.

    Tableau Online Course
    Tableau Training In Bangalore
    Tableau Training In Chennai

    ReplyDelete

Powered by Blogger.