Rapid Calculations with Drag & Drop in 9.0

Contributor & Author: Tiffany Spaulding
Reference: Click Here

Here's a flashback to Tableau Desktop 8.3 to jog your memory in terms of how different the experience of 9.0 is. To build formulas, we either typed the code manually or scrolled through lists and double clicked the items we wanted to use.  
                                                                                                                                   

Tableau 9: A Whole New World
The biggest feature in 9.0 that affects my design speed is the drag and drop enhancements in the new calculations window. Simple mouse clicks now minimize manually entered syntax. Instead of having to double-click specific fields from scrolling lists or meticulously type every character from memory, Tableau 9.0 converts your drag & drop actions into code.
Feature #1: Pills become code when pulled IN to the calc editor from the view or data window.

Feature #2: Code becomes pills when pulled OUT of calc editor into the view or data window.

Feature #3: is the element that I failed to realize (pure oversight) until about a month ago. Pieces of code can be highlighted in the calc window then pulled into view to test. I don't know why I assumed you had to take either a small piece of the formula or the whole shebang, but my efficiency is better now that I know. These new design features reflect Tableau's iterative approach to visualizing data, allowing you to compare outcomes as you think with the tool.
Notes:

  • Operators still need to be hard coded from the keyboard () [] {} + - / * < <= > >= <>.
  • Functions still need to be double clicked from the list at the right-hand side of the calc editor (or may be typed in from the keyboard).
  • If pulling an instance of a field from a shelf into the formula box, you do not need a CTRL + drag like some may think. Tableau leaves the original instance on the shelf and copies the code of the field into the calculation syntax. 
  • In my research to the limits of the drag and drop capabilities of the 9.0 calc editor, I discovered two limitations. First, the formula box will not receive Right Click drag (to select AVG Sales instead of Sum Sales) and second, the functions listed at the right of the formula box cannot be added via drag and drop. 

Understanding Layout Containers in Tableau

Contributor & Author: Tiffany Spaulding
Reference: Click Here
Layout Containers in Tableau 8 force spatial relationships between dashboard components. Conceptually, they allow the dashboard designer to format common elements and move multiple dashboard objects at the same time. 
Layout Containers come in one of two options: Horizontal or Vertical. 
  • Horizontal layout containers allow the designer to group worksheets and dashboard components left to right across your page and edit the height of all elements at once. 
  • Vertical containers allow the user to group worksheets and dashboard components top to bottom down your page and edit the width of all elements at once.

Individual elements within any dashboard (worksheet, text box, blank, image, web page, quick filter, parameter, legend) will highlight with a gray border when selected. Layout containers highlight with a blue borders instead.
Layout containers are forced to the background of the view and can be tricky to select. To select the layout container that a dashboard object is within, first select the item (gray border). Then, using the dropdown arrow at the top right of the active object, choose “Select Layout Container”.















Within the left-hand design window of the dashboard interface, you can also drill down to each object within your dashboard via the Layout section. Clicking on an element here will highlight the item within your view. This method is quite efficient when you have nested layout containers (perhaps a vertical container within a horizontal container). 

 Got the basics now?  Let's go test your knowledge.
I transitioned to Business Intelligence from an engineering and design background (architecture), and therefore I tend to de-construct views to determine how to build it in Tableau. Let's look at a few example dashboards and determine what layout containers would be required to build these views. 
View 1: Title Bar with 3 Worksheets

We would need one horizontal layout container (shown in blue) at the top of our view to house the 5 objects that make up the title bar. 

View 2: Title Bar and Interactivity for 3 Worksheets

Two layout containers would be used for this view: One horizontal container for the title bar (shown in orange) and one vertical container for the interactivity elements (shown in blue).

 View 3: Title Bar and Interactivity for 2 Worksheets

This view uses 3 layout containers: one horizontal for the title bar (orange), one vertical for the interactivity elements (blue), and one horizontal for the 2 worksheets and interactivity container (green). In this layout, we nest one layout container within another.

 Benefits of using layout containers:
  • Encourages consistency across a series of dashboards. For example, you could add a title bar across the top of your dashboard could be fixed to a specific height and used on every sheet in your workbook.  Or you could group interactivity elements such as legends, quick filters and parameters into a container to keep the layout consistent across multiple dashboards.
  • Formatting of container independent from object – You can add a border to a layout container to visually separate components on a dashboard instead of adding borders to individual elements.
  • Ability to lock in one dimension (width or height).
  •  Additional control over tiled object landing options within the dashboard.

People's Capital Donations Summary Dashboard

I Spend lot of time to make this Dashboard. I thought I can refresh this dashboard daily. But now unfortunately the official site restricted exporting data to recent 100 records due to high traffic. Any way I just want to share with you this dashboard.

























Visual Cues and Icons in Tableau Desktop

Tableau provides many visual cues to help you evaluate the type of data that’s displayed in the Data pane and the state of a data view.

Data Sources in the Data Pane

The following table explains each of the icons used to describe the type of data sources in the Data pane. Each icon in the table can be modified by one of two indicators. 

Fields in the Data Pane

The following table explains each of the icons displayed in the Data pane. Each icon in the table can be modified by one of four indicators.
Fields on Shelves
Fields placed on shelves use a combination of icons, colors, and text styles as visual cues. 

Fields on the Marks card

Fields placed on the Marks card use specific icons to describe how they appear in the view. See Mark Properties. 

Sheets in the Dashboards and Worksheets pane



Reference: Click Here

Scenario 13: Sets for Top N and Others

Step 1 
Open a new workbook and connect to the Superstore sample data source.
Step 2 
Right-click Customer Name, select Create > Set.
Step 3 
In the Create Set dialog box, do the following: 
  1. In the Name text box, type Top N Customers by Sales.
  2. On the Top tab, select By Field, and then select Sales from the field list and Sum from the aggregation list.

  1. When finished, click OK.
To determine the top N value—that is, the number of top customers you want to show—you can specify a static number or a dynamic parameter. This procedure uses the sample data source's Top Customers parameter. The Top Customers parameter is defined as an integer with allowable values of 5-40, in increments of 5.
Note: If you used a parameter to determine the size of the set, be sure to right-click the parameter and select Show Parameter Control.



















Step 4 
Complete the following steps to create the initial view:
  1. From the Sets pane, drag Top N Customers by Sales to the Rows shelf.
  2. From the Dimensions pane, drag Customer Name to the Rows shelf, positioning it to the right of the set.
  3. From the Measures pane, drag Sales to Text on the Marks card.
  4. Click the Descending Sort button  
    on the toolbar to see that the set is working.
Step 5 
In the Sets pane, right-click Top N Customers by Sales and then click Create Calculated Field.
Step 6 
In the Calculated Field dialog box, complete the following steps.
  1. In the Name text box, type Subset Labels.
  2. In the Formula text box, type the following formula to create dynamic labels for the customers in the set.
IF [Top N Customers by Sales]
THEN "Top " + str([Top Customers]) + " Customers"
ELSE "Others"
END


  1. When finished, click OK.
Step 7 
From the Dimensions pane, drag Subset Labels to the Rows shelf, placing it between the Top N set and the Customer Name dimension.
Step 8 
On the Rows shelf, right-click the Top N set and select Show Header.
This hides the In /Out labels while retaining the sort order, so that your top N subset always appears at the top of the view.
Additional tips for improving the view's functionality (optional)
Here are some additional steps you can take to give your viewers more flexibility in displaying the customer subsets.
Step 1 
Right-click the Data pane and select Create Parameter.
Step 2 
In the Create Parameter dialog box, create the following parameter:
  1. In the Name text box, type Expand or Collapse.
  2. For Data type, select String.
  3. For Allowable Values, select List.
  4. In the List of values, add the values Expand and Collapse.

  1. When finished, click OK.
Step 3 
Select Analysis > Create Calculated Field, and then do the following to create a calculation that uses the parameter you created to enable viewers to specify how to view customers in the Others subset.
  1. In the Name text box, type Customer Names.
  2. In the Formula box, type the following formula:
IF [Expand or Collapse]="Collapse" THEN
IF [Top N Customers by Sales]
THEN [Customer Name]
ELSE "Others" END
ELSE [Customer Name] END


  1. When finished, click OK.
Step 4 
In the Parameters pane, right-click Expand or Collapse parameter and then select Show Parameter Control.
Step 5 
From the Dimensions pane, drag Customer Names to the Rows shelf, and place it directly on top of Customer Name, so that it replaces Customer Name.
Now you can use the Expand or Collapse parameter control to see the names the top N customers, where N is determined by the value set in the Top Customers parameter control—in one group, and the remaining customers individually or rolled up into a single Others entry.