Tableau – Bump Chart ”; Previous Next A Bump Chart is used to compare two dimensions against each other using one of the Measure value. They are very useful for exploring the changes in Rank of a value over a time dimension or place dimension or some other dimension relevant to the analysis. The Bump Chart takes two dimensions with zero or more measures. Creating a Bump Chart Using the Sample-superstore, plan to find the variation of ship mode of products with the variation of the Sub-Category. To achieve this objective, following are the steps. Step 1 − Drag and drop the dimension Sub-Category to the Columns shelf. Also drag the dimension Ship mode to the Color shelf under Marks card. Leave the chart type to Automatic. The following chart appears. Step 2 − Next, create a calculated field called Rank. Go to Analysis → Create Calculated Field. Use Rank as the field name and write the expression index () in the calculation area. It is an inbuilt function that creates an index for the current row in the partition. Click OK and the new field will be visible in the measures section. Right-click on the field Rank and convert it to discrete. Step 3 − Drag Rank to the Rows shelf. The following chart appears which shows the dimension Sub-Category with each ship mode arranged in an increasing order of their Rank value. Step 4 − Apply some more calculation to the rank field using the measure Profit. Rightclick on Rank and choose Edit Table calculation. Choose the sorting by the field profit using partition by Sub-Category and addressed by ship mode. The following screenshot shows the calculations applied. On completion of the above steps, you will get the bump chart as shown in the following screenshot. It shows the variation of profit for each ship mode across various subcategories. Print Page Previous Next Advertisements ”;
Category: tableau
Tableau – Functions
Tableau – Functions ”; Previous Next 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 Date Functions Logical Functions Aggregate Functions Number Functions These are the functions used for numeric calculations. They only take numbers as inputs. Following are some examples of important number functions. Function Description Example CEILING (number) Rounds a number to the nearest integer of equal or greater value. CEILING(2.145) = 3 POWER (number, power) Raises the number to the specified power. POWER(5,3) = 125 ROUND (number, [decimals]) Rounds the numbers to a specified number of digits. ROUND(3.14152,2) = 3.14 String Functions String Functions are used for string manipulation. Following are some important string functions with examples Function Description Example LEN (string) Returns the length of the string. LEN(“Tableau”) = 7 LTRIM (string) Returns the string with any leading spaces removed. LTRIM(” Tableau “) = “Tableau” REPLACE (string, substring, replacement) Searches the string for substring and replaces it with a replacement. If the substring is not found, the string is not changed. REPLACE(“GreenBlueGreen”, “Blue”, “Red”) = “GreenRedGreen” UPPER (string) Returns string, with all characters uppercase. UPPER(“Tableau”) = “TABLEAU” Date Functions Tableau has a variety of date functions to carry out calculations involving dates. All the date functions use the date_part which is a string indicating the part of the date such as – month, day, or year. Following table lists some examples of important date functions. Function Description Example DATEADD (date_part, increment, date) Returns an increment added to the date. The type of increment is specified in date_part. DATEADD (”month”, 3, #2004-04-15#) = 2004-0715 12:00:00 AM DATENAME (date_part, date, [start_of_week]) Returns date_part of date as a string. The start_of_week parameter is optional. DATENAME(”month”, #200404-15#) = “April” DAY (date) Returns the day of the given date as an integer. DAY(#2004-04-12#) = 12 NOW( ) Returns the current date and time. NOW( ) = 2004-04-15 1:08:21 PM Logical Functions These functions evaluate some single value or the result of an expression and produce a boolean output. Function Description Example IFNULL (expression1, expression2) The IFNULL function returns the first expression if the result is not null, and returns the second expression if it is null. IFNULL([Sales], 0) = [Sales] ISDATE (string) The ISDATE function returns TRUE if the string argument can be converted to a date, and FALSE if it cannot. ISDATE(“11/05/98”) = TRUE ISDATE(“14/05/98”) = FALSE MIN(expression) The MIN function returns the minimum of an expression across all records or the minimum of two expressions for each record. Aggregate Functions Function Description Example AVG(expression) Returns the average of all the values in the expression. AVG can be used with numeric fields only. Null values are ignored. COUNT (expression) Returns the number of items in a group. Null values are not counted. MEDIAN (expression) Returns the median of an expression across all records. Median can only be used with numeric fields. Null values are ignored. STDEV (expression) Returns the statistical standard deviation of all values in the given expression based on a sample of the population. Print Page Previous Next Advertisements ”;
Tableau – Numeric Calculations ”; Previous Next Numeric calculations in Tableau are done using a wide range of inbuilt functions available in the formula editor. In this chapter, we will see how to apply calculations to the fields. The calculations can be as simple as subtracting the values of two fields or applying an aggregate function to a single field. Following are the steps to create a calculation field and use numeric functions in it. Create Calculated Field While connected to Sample-superstore, go to the Analysis menu and click ‘Create Calculated Field’, as shown in the following screenshot. Calculation Editor The above step opens a calculation editor which lists all the functions that is available in Tableau. You can change the dropdown value and see only the functions related to numbers. Create a Formula To study the difference between profit and discount for different shipping mode of the products, create a formula subtracting the discount from the profit as shown in the following screenshot. Also, name this field as profit_n_discount. Using the Calculated Field The above calculated field can be used in the view by dragging it to the Rows shelf as shown in the following screenshot. It produces a bar chart showing the difference between profit and discount for different shipping modes. Applying Aggregate Calculations In a similar manner as above, you can create a calculated field using aggregate function. Here, create AVG(sales) values for different ship mode. Write the formula in the calculation editor as shown in the following screenshot. On clicking OK and dragging the Avg_Sales field to the Rows shelf, you will get the following view. Print Page Previous Next Advertisements ”;
Tableau – Add Worksheets
Tableau – Add Worksheets ”; Previous Next Worksheet in the Tableau screen is the area where you create the views for data analysis. By default, Tableau provides three blank worksheets when you have established a connection to data source. You can go on adding multiple worksheets to look at different data views in the same screen, one after another. Adding a Worksheet You can add a worksheet in two ways. Right-click on the name of the current worksheet and choose the option New Worksheet from the pop-up menu. You can also click on the small icon to the right of the last sheet name to add a worksheet. Quick Preview of a Worksheet Staying in one worksheet, you can have a quick preview of another worksheet by hovering the mouse on the name of the other worksheet. Print Page Previous Next Advertisements ”;
Tableau – Box Plot
Tableau – Box Plot ”; Previous Next The box plots are also known as a box-and-whisker plots. They show the distribution of values along an axis. Boxes indicate the middle 50 percent of the data which is, the middle two quartiles of the data”s distribution. The remaining 50 percent of data on both sides is represented by lines also called whiskers, to display all points within 1.5 times the interquartile range, which is all points within 1.5 times the width of the adjoining box, or all points at the maximum extent of the data. The Box Plots take one or more measures with zero or more dimensions. Creating a Box Plot Using the Sample-superstore, plan to find the size of profits for the respective category for each Ship mode values. To achieve this objective, following are the steps. Step 1 − Drag and drop the dimension category to the Columns shelf and profit to the Rows shelf. Also drag the dimension Ship mode to the right of Category in Columns shelf. Step 2 − Choose Box-and-Whisker plot from Show Me. The following chart appears which shows the box plots. Here, Tableau automatically reassigns the ship mode to the Marks card. Box Plot with Two Dimensions You can create box plots with two dimensions by adding another dimension to the Column shelf. In the above chart, add the region dimension to the Column shelf. This produces a chart which shows the box plots for each region. Print Page Previous Next Advertisements ”;
Tableau – Scatter Plot
Tableau – Scatter Plot ”; Previous Next As the name suggests, a scatter plot shows many points scattered in the Cartesian plane. It is created by plotting values of numerical variables as X and Y coordinates in the Cartesian plane. Tableau takes at least one measure in the Rows shelf and one measure in the Columns shelf to create a scatter plot. However, we can add dimension fields to the scatter plot which play a role in marking different colors for the already existing points in the scatter graph. Simple Scatter Plot Using the Sample-superstore, let”s aim to find the variation of sales and profit figures as the two axes of the Cartesian plane is distributed according to their Sub-Category. To achieve this objective, following are the steps. Step 1 − Drag and drop the measure Sales to the Columns shelf. Step 2 − Drag and drop the measure Profit to the Rows shelf. Step 3 − Pull the dimension Sub-Category to the labels Shelf under Marks. The following chart appears which shows how profit and sales is distributed across the Sub-Category of products. Scatter Plot – Color Encoded You can get the values color encoded by dragging the dimension Sub-Category to the color Shelf under the Marks card. This chart shows the scatter points with different color for each point. Drill-Down Scatter Plot The same scatter plot can show different values when you choose a dimension with hierarchy. In the following example, we expand the Sub-Category field to show the scatter plot values for the Manufacturers. Print Page Previous Next Advertisements ”;
Tableau – Quick Filters
Tableau – Quick Filters ”; Previous Next Many filter types in Tableau are quickly available using the right-click option on the dimension or measure. These filters known as Quick filters have enough functionality to solve most of the common filtering needs. The following screenshot shows how the quick filters are accessed. Following is a list of various quick filters and their use. Filter name Purpose Single Value (List) Select one value at a time in a list. Single Value (Dropdown) Select a single value in a drop-down list. Multiple Values (List) Select one or more values in a list. Multiple Values (Dropdown) Select one or more values in a drop-down list. Multiple Values (Custom List) Search and select one or more values. Single Value (Slider) Drag a horizontal slider to select a single value. Wildcard Match Select values containing the specified characters. Example Consider the Sample-Superstore data source to apply some quick filters. In the following example, choose sub-category as the row and sales as the column which by default produces a horizontal bar chart. Next, drag the sub-category field to the filters pane. All the subcategories appear next to the chart. Apply wildcard filtering using the expression a* which selects all subcategory name starting with “a”. The below screen shows the result of applying this filter where only the sub-categories starting with “A” are displayed. Clearing the Filter Once the analysis is complete by applying the filter, remove it by using the clear filter option. For this, go to the filter Pane, right-click on the field name and choose Clear Filter as shown in the following screenshot. Print Page Previous Next Advertisements ”;
Tableau – Bubble Chart
Tableau – Bubble Chart ”; Previous Next Bubble charts display data as a cluster of circles. Each of the values in the dimension field represents a circle whereas the values of measure represent the size of those circles. As the values are not going to be presented in any row or column, you can drag the required fields to different shelves under the marks card. Simple Bubble Chart Using the Sample-superstore, let”s plan to find the size of profits for different ship mode. To achieve this objective, following are the steps. Step 1 − Drag and drop the measure profit into the Size shelf under Marks card. Step 2 − Drag and drop the dimension ship mode into the Labels shelf under Marks card. Step 3 − Pull the dimension ship mode to the Colors shelf under Marks card. The following chart appears. Bubble Chart with Measure Values You can also show the values of the measure field which decides the size of the circles. To do this, drag the sales measure into the Labels shelf. The following chart appears. Bubble Chart with Measure Colors Instead of coloring each circle with a different color, you can use a single color with different shades. For this, drag the measure sales into the color shelf. The higher values represent darker shades while the smaller values represent lighter shades. Print Page Previous Next Advertisements ”;
Tableau – Crosstab
Tableau – Crosstab ”; Previous Next A crosstab chart in Tableau is also called a Text table, which shows the data in textual form. The chart is made up of one or more dimensions and one or more measures. This chart can also show various calculations on the values of the measure field such as running total, percentage total, etc. Simple Crosstab Using the Sample-superstore, let”s plan to get the amount of sales for each segment in each region. You need to display this data for each year using the order dates available. To achieve this objective, following are the steps. Step 1 − Drag and drop the dimension order date to the columns shelf. Step 2 − Drag and drop the dimensions region and segment to the rows shelf. Step 3 − Pull the measure Sales to the labels Shelf under Marks. The following chart appears which shows the Crosstab. Crosstab – Color Encoded You can get the values color encoded in the crosstab chart by dropping the measure field into the Color shelf as shown in the following screenshot. This color coding shows the strength of the color depending on the value of the measure. The larger values have a darker shade than the lighter values. Crosstab with Row Percentage In addition to the color encoding, you can also get calculations applied to the values from the measure. In the following example, we apply the calculation for finding the percentage total of sales in each row instead of only the sales figures. For this, right-click on SUM (Sales) present in the marks card and choose the option Add Table Calculation. Then, choose the percent of total and summarize it as Table (Across). On clicking OK in the screen above, you will find the crosstab chart created with percentage values as shown in the following screenshot. Print Page Previous Next Advertisements ”;
Tableau – Dashboard
Tableau – Dashboard ”; Previous Next A dashboard is a consolidated display of many worksheets and related information in a single place. It is used to compare and monitor a variety of data simultaneously. The different data views are displayed all at once. Dashboards are shown as tabs at the bottom of the workbook and they usually get updated with the most recent data from the data source. While creating a dashboard, you can add views from any worksheet in the workbook along with many supporting objects such as text areas, web pages, and images. Each view you add to the dashboard is connected to its corresponding worksheet. So when you modify the worksheet, the dashboard is updated and when you modify the view in the dashboard, the worksheet is updated. Creating a Dashboard Using the Sample-superstore, plan to create a dashboard showing the sales and profits for different segments and Sub-Category of products across all the states. To achieve this objective, following are the steps. Step 1 − Create a blank worksheet by using the add worksheet icon located at the bottom of the workbook. Drag the dimension Segment to the columns shelf and the dimension Sub-Category to the Rows Shelf. Drag and drop the measure Sales to the Color shelf and the measure Profit to the Size shelf. This worksheet is referred as the Master worksheet. Right-click and rename this worksheet as Sales_Profits. The following chart appears. Step 2 − Create another sheet to hold the details of the Sales across the States. For this, drag the dimension State to the Rows shelf and the measure Sales to the Columns shelf as shown in the following screenshot. Next, apply a filter to the State field to arrange the Sales in a descending order. Right-click and rename this worksheet as Sales_state. Step 3 − Next, create a blank dashboard by clicking the Create New Dashboard link at the bottom of the workbook. Right-click and rename the dashboard as Profit_Dashboard. Step 4 − Drag the two worksheets to the dashboard. Near the top border line of Sales Profit worksheet, you can see three small icons. Click the middle one, which shows the prompt Use as Filter on hovering the mouse over it. Step 5 − Now in the dashboard, click the box representing Sub-Category named Machines and segment named Consumer. You can notice that only the states where the sales happened for this amount of profit are filtered out in the right pane named Sales_state. This illustrates how the sheets are linked in a dashboard. Print Page Previous Next Advertisements ”;