EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 360+ Courses All in One Bundle
  • Login

CrossTab in Tableau

Home » Data Science » Data Science Tutorials » Tableau Tutorial » CrossTab in Tableau

CrossTab-in-Tableau

Introduction to CrossTab in Tableau

CrossTab in Tableau is a type of chat that is also known as the text table or pivot table. Cross tab includes one or more measures along with the dimensions for the visualization. It also supports calculated fields for dynamic value representation.CrossTab in Tableau can be used for various types of reports and charts such as sales and profit of a range of products for a particular time period. CrossTab is very meaningful for business users. Some of the best practices to crossTab in Tableau are adding proper naming conventions and forming proper data hierarchy while developing the reports and visualizations.

Tableau by default divides the entire data into two categories

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

  1. Dimension: Contains qualitative values Such as Name, Date, Location, etc. They affect the level of detail of your data.
  2. Measures: Contains the quantitative values / Numeric values. Calculations can be performed on measures.

 Dimension and Measure

Image – 1 The part which is highlighted in yellow shows the Dimensions and measures.

Problem Statement

Suppose you are the manager of the Restaurant and wanted to prepare for a meeting with the stakeholders who are interested to know about the Restaurant’s performance over the period of time. As a manager, you can display the sales of the products over a period of time or the Profit of the restaurant over the period of time.

Let us progress with building a strong insightful report using Tableau’s Crosstab.

Forming a CrossTab in Tableau

We have the data available with us about the Restaurant. We are going to use the Excel file as our data source. Please find the file attached.

Let us do it together to have a better understanding of the crosstabs/text tables.

Step 1: Connect to the “Microsoft Excel” file.

Microsoft Excel

Image – 2 showing the data source to be connected.

Step 2: Select the file from the location where the file exists In this case, we have to select the file ‘Coffee File.xlsx’. The below screen appears once the data is retrieved from the excel sheet.

Coffee File

Image – 3 shows Coffee File Data.

Step 3: Open a new worksheet. The top right corner displays the variety of charts available in Tableau. One of them is the Text Table also knows as CrossTab. As highlighted in the box it requires one or more dimensions and one or more measures for forming a text table.

CrossTab in Tableau-1.4

Image – 4 shows along with the required Dimension & Measures for the particular chart type.

Popular Course in this category
Tableau Training (4 Courses, 6+ Projects)4 Online Courses | 6 Hands-on Projects | 39+ Hours | Verifiable Certificate of Completion | Lifetime Access
4.5 (5,805 ratings)
Course Price

View Course

Related Courses
Business Intelligence Training (12 Courses, 6+ Projects)Data Visualization Training (15 Courses, 5+ Projects)
Note: Currently the available charts are greyed out. Once the required data is placed in the Rows and Column shelf the recommended charts will be available in the same tab.

Step 4: Drag and drop the dimensions “Product Type” and “Products” in the row shelf.

Step 5: Drag and drop the dimensions “Date” in the column shelf.

Step 6: Drag and drop the measures “Sales” under the Marks Shelf.

The outcome of the above action forms a “Crosstab”.

CrossTab in Tableau-1.5

Image – 5 shows the outcome after steps 4,5 and 6.

Note: The date which is in the format “DD-MM-YYYY” is displayed as “Year” with a + sign. It is because Tableau automatically forms the hierarchy of the dates in the following way.

CrossTab in Tableau-1.6
Step 7: Color-Coded Text Table

Make the chart even more attractive and insightful by adding colors to the measures. Just drag and drop the Measure “Sales” in the color Mark card and your values will be color-coded.

Color Coded Crosstab

Image – 6 shows the Color Coded Crosstab

The darker shade represents a higher sale while a lighter shade represents a lower sale.
Now your chart has started narrating its own story and this is what you might have aimed for.

Step 8: Row Calculations – As already mentioned, we can also perform calculations on the measures. Follow the below steps.

  1. Click on the down arrow of the Sales field on the Mark card.
  2. Chose the Option Add Table Calculation.
  3. From the calculation type, select the “Percent of total” and selectTable(down) option from “compute using the field”.
  4. The Chart now shows the percentage of values.
Note: Refer Image – 7,8,9 for the 2,3,4 respectively.
CrossTab in Tableau-1.8
Image – 7

CrossTab in Tableau-1.9

Image – 8

CrossTab in Tableau-1.10

Image – 9

Step 9: We can also form more reports using Profit as a measure and showcase in which the Product has the maximum profit over the given period of time.

Limitation of CrossTab in Tableau

There is some limitation in CrossTab in Tableau:

1. Fixed Rows & Columns: By default, we have Six rows and columns in tableau. You can increase the number of rows and columns to a maximum of 16 by following the below-mentioned steps.

Resize the number of row and column

Image – 10 resize the number of Rows and Columns.

Row and column size

Image – 11 shows rows and columns size.

2. Difficult Interpretation: The Crosstab is the representation of data in a textual form which is comparatively little difficult to interpret than the other graphical forms of representation. You need to focus on reading and comparing the numbers for deriving any pattern or insights.

Where to Use the CrossTab in Tableau?

It is mostly preferred in the area where you want to display the relationship between two or more dimensions.

Good Practices while working with Tableau

  • Naming convention: Give the valid name to everything from your Data source sheet or SQL query to your worksheet, Dashboard, or Story. Following this practice from the very beginning will help you in the long run while building a huge dashboard having multiple sheets as well as data sources.
  • Form Hierarchy: Spend the initial few minutes just looking at the data and see if we can form any kind of hierarchies. In the case of Coffee File Data Product type and Product can form a Hierarchy. Also, Market Size, Market, state and Area Code can for another hierarchy

Conclusion

Crosstab /Text Table because of its high resemblance with the Pivot table of excel is also known as Pivot tables. Crosstab being one of the most basic and popularly used forms of the chart in tableau. Adding the color and calculation can enhance the storytelling experience with your data.

Recommended Articles

This is a guide to CrossTab in Tableau. Here we discuss the problem statement, where to use and the formation of crosstab with its limitation. You may also look at the following articles to learn more-

  1. Sorting in Tableau
  2. Forecast in Tableau
  3. Tableau Aggregate Functions
  4. Introduction to Features and Attributes of Tableau
  5. Guide to Group in Tableau

Tableau Training (4 Courses, 6+ Projects)

4 Online Courses

6 Hands-on Projects

39+ Hours

Verifiable Certificate of Completion

Lifetime Access

Learn More

0 Shares
Share
Tweet
Share
Primary Sidebar
Tableau Tutorial
  • Charts
    • Tableau Charts
    • Tableau Chart Types
    • Donut Chart in Tableau
    • Funnel Chart in Tableau
    • Gantt Chart in Tableau
    • Bubble Chart in Tableau
    • Pareto Chart in Tableau
    • Sankey Chart In Tableau
    • Stacked Bar Chart in Tableau
    • Tableau Bullet Chart
    • Waterfall Chart in Tableau
    • Line Chart in Tableau
    • Heat Map in Tableau
    • Histogram in Tableau
    • CrossTab in Tableau
    • Treemap in Tableau
    • Trend Lines in Tableau
    • Tableau Reference Lines
    • Tableau Dual Axis
    • Legend in Tableau
    • Pie Chart in Tableau
    • Tableau Storyline
  • Basic
    • What is Tableau
    • What is Tableau Dashboard
    • What is Tableau Server
    • Uses of Tableau
    • Tableau Versions
    • Tableau Architecture
    • Is Tableau Free
    • Tableau New Features
    • How To Install Tableau
    • How to Use Tableau?
    • Install Tableau Server
    • Tableau Commands
  • Statement
    • Tableau IF Statement
    • Case Statement in Tableau
  • Functions
    • Tableau Functions
    • Tableau String Functions
    • Concatenate in Tableau
    • Rank Function in Tableau
    • Tableau Aggregate Functions
    • Tableau Date Functions
    • Window Sum Tableau
    • LOD Expressions in Tableau
    • LOOKUP Function in Tableau
    • Tableau Fixed Function
    • Tableau Count Distinct
    • Tableau Window Functions
  • Sort/Filters
    • Sorting in Tableau
    • Filters in Tableau
    • Types of Filters in Tableau
    • Tableau Action Filter
    • Context Filter in Tableau
    • Tableau Parameter Filter
    • Adding Filters in Tableau Dashboard
    • Tableau Context Filter
  • Tableau Dashboard
    • Dashboard in Tableau
    • Tableau Dashboard Creation
    • Tableau Dashboard Design
    • Tableau Workbook
  • Advanced
    • Tableau Reporting
    • Tableau Reporting Tool
    • Conditional Formatting in Tableau
    • Data Blending in Tableau
    • Parameters in Tableau
    • Tableau Data Sets
    • Tableau Drill Down
    • Tableau Dynamic Parameters
    • Tableau Table Calculation
    • Tableau Visualization
    • Tableau Joins
    • Pivot in Tableau
    • Data Visualization With Tableau
    • Forecast in Tableau
    • Map Layers in Tableau
    • Group in Tableau
    • Tableau Group by
    • Hierarchy in Tableau
    • Sets in Tableau
    • How to create a Set in Tableau
    • Tableau Order of Operations
    • Tableau User Group
    • Tableau Calculated Field
    • Custom SQL in Tableau
  • Interview Questions
    • Tableau Interview Questions

Related Courses

Tableau Certification Course

Business Intelligence Courses

Data Visualization Courses

Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Database Management
  • Machine Learning
  • All Tutorials
Certification Courses
  • All Courses
  • Data Science Course - All in One Bundle
  • Machine Learning Course
  • Hadoop Certification Training
  • Cloud Computing Training Course
  • R Programming Course
  • AWS Training Course
  • SAS Training Course

© 2020 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

*Please provide your correct email id. Login details for this Free course will be emailed to you
Book Your One Instructor : One Learner Free Class

Let’s Get Started

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA Login

Forgot Password?

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

*Please provide your correct email id. Login details for this Free course will be emailed to you