Skip to content
Data Analytics & BI

Tableau interview questions and answers

59 questions, 22 with code. About 5 h 2 min to read them all.

By TestLab · Updated

Plan for an interview
59 questions

Track what you know and what to revise.

Sign in to track progress

You can open a few full answers without signing in. Sign in to read all

1

What are the differences among Tableau Desktop, Tableau Server, and Tableau Cloud?

Tableau Desktop is the authoring and analysis application, Tableau Server is a centrally managed, customer-hosted platform, and Tableau Cloud is Salesforce’s separately licensed, managed service for publishing and governing Tableau content. Together, they support a workflow from local development to organization-wide publishing and consumption.

Read full answer

Applies toTableau Desktop, Tableau Server, and Tableau Cloud (current releases)

Core Differences

Capability Tableau Desktop Tableau Server Tableau Cloud
Primary purpose Create and explore workbooks locally Publish and share workbooks in an organization Publish and share workbooks through a managed service
Hosting Installed on each analyst’s computer Hosted on infrastructure controlled by the organization Hosted and operated by Salesforce
Typical user Analyst, report developer, business user Analysts, executives, dashboard consumers Analysts, executives, dashboard consumers
Data connections Connects directly to Excel, databases, APIs, and other supported sources Provides centralized, governed connections to enterprise data Provides centrally managed connections subject to cloud connectivity restrictions
Publishing Publishes to Server, Cloud, or Tableau Public Hosts published content and manages access Hosts published content and manages access
Administration Limited administration of local settings Full administration of users, permissions, licences, schedules, and security Administration of users, permissions, licences, schedules, and security by the customer and Salesforce
Scale Primarily a single-user desktop application Designed for concurrent organizational use Designed for concurrent organizational use

How the Products Work Together

  1. An analyst creates a workbook in Tableau Desktop.

  2. The analyst connects to the required data source and builds views, dashboards, filters, actions, and calculated fields.

  3. The workbook is saved locally as a .twb file or as a packaged .twbx workbook.

  4. The analyst selects Server → My Content → Publish in Tableau Desktop and chooses Tableau Server or Tableau Cloud as the destination.

  5. Administrators assign permissions and configure data-source credentials, refresh schedules, subscriptions, and site settings.

  6. Consumers open published content through a browser without installing Tableau Desktop.

The calculation and visualization logic remains the same when a workbook is published. Moving from Desktop to Server or Cloud changes hosting, access, administration, and refresh infrastructure—not Tableau’s calculation syntax.

Data Connections and Refresh

Tableau Desktop can work with local files such as Excel and CSV or establish live connections to supported databases.

After publishing, two common approaches are available:

  • Live connection: Tableau queries the source through the Server or Cloud environment. Centralized credentials and network configuration become important.

  • Extract connection: Tableau stores a snapshot of the source data. Extracts can be refreshed on Server or Cloud and may perform better for large or frequently accessed dashboards.

Server is commonly deployed on an organization’s on-premises network or on infrastructure managed by that organization. Cloud provides managed infrastructure, but source connectivity can be limited by firewalls, private networking, and supported connector requirements.

Business Example

Suppose an analyst has the following sales data:

Region Quarter Sales
Central Q1 120,000
North Q1 150,000
West Q1 180,000

The analyst uses Tableau Desktop to create a dashboard with:

  • SUM(Sales) as the sales measure.

  • Region as a discrete dimension.

  • A dashboard filter for the selected quarter.

  • A published extract for predictable dashboard performance.

In Tableau Cloud, regional managers access the dashboard through a browser and see:

Region Displayed Sales
Central 120,000
North 150,000
West 180,000

The expected result is total sales of 450,000, with regional totals available through filters or dashboard actions. In Tableau Server, the same workbook can be hosted internally when data must remain under the organization’s direct control.

Adjacent Product: Tableau Prep

Tableau Prep provides data preparation and transformation. Analysts can clean files, reshape data, combine sources, and create flows before publishing the resulting data source to Tableau Server or Tableau Cloud. It complements Desktop; it does not replace Desktop’s visualization capabilities or Server and Cloud’s publishing and administration.

Best Practices and Pitfalls

  • Choose Tableau Server when the organization requires direct infrastructure control, private-network connectivity, or specific administrative control.

  • Choose Tableau Cloud when managed hosting, straightforward provisioning, and Salesforce-managed infrastructure are priorities.

  • Use Tableau Desktop for report development and local exploration, not as the primary organization-wide dashboard distribution platform.

  • Prefer extracts for frequently accessed dashboards or demanding queries, but monitor extract size and refresh frequency.

  • Centralize sensitive data-source credentials in Server or Cloud rather than embedding them in workbooks.

  • Test filters, aggregations, and LOD expressions after publishing because source connectivity and extract refreshes can affect execution behavior.

  • Do not confuse Tableau Cloud with Tableau Public. Tableau Public is primarily for sharing visualizations publicly; Tableau Cloud supports private organizational content and governed sharing.

2

What is Tableau Prep used for in data preparation?

Tableau Prep is Tableau’s visual data-preparation environment for extracting, transforming, and loading (ETL) data. It lets analysts connect to sources, clean and reshape data, combine tables, validate results, and publish prepared datasets for Tableau Desktop, Tableau Server, or Tableau Cloud.

Read full answer

Applies toTableau Prep Builder and Tableau Prep Conductor (current release)

Core Capabilities

  • Connect data: Use Add Connection to File or Add Connection to Database for Excel, CSV, JSON, SQL databases, Google Sheets, Salesforce, and other supported sources.

  • Profile data: Inspect field data types, null percentages, distinct counts, ranges, and outliers in the Profile pane.

  • Clean data: Standardize names, remove whitespace, fix data types, rename fields, split values, and handle errors.

  • Combine data:

  • Drag related tables onto the canvas to create a join.

  • Configure the join type and join clause using matching business keys.

  • Use Add > Union to append tables with compatible structures.

  • Reshape data: Pivot, unpivot, group, split, and aggregate fields.

  • Create reusable flows: Save transformation logic as a Tableau Prep flow rather than repeating cleanup manually.

  • Publish outputs: Export to CSV or Hyper, or publish flows and outputs to Tableau Server or Tableau Cloud.

  • Schedule and monitor: Tableau Prep Conductor runs published flows on schedules and provides centralized monitoring in governed environments.

How It Works

A Tableau Prep flow is a visual pipeline:

  1. Add one or more data sources.

  2. Place cleaning, joining, aggregation, and other transformation steps on the canvas.

  3. Review the Profile pane and step results after each transformation.

  4. Add output steps for Tableau or extracted files.

  5. Save the flow and publish it where governed scheduling is required.

Steps flow from left to right, from inputs toward outputs. An upstream change can therefore affect every downstream result. Place filtering, cleaning, and joining steps before aggregation when they should operate on detailed records.

Business Example

Suppose an Excel source contains the following data:

Order ID Customer Name Amount
1001 Acme Ltd $250
1002 Beta LLC $100
1003 Beta LLC $75

The names contain inconsistent whitespace, while Amount is stored as text.

In Tableau Prep:

  1. Select Customer Name, add a Clean step, and choose to trim spaces.

  2. Select Create > Calculated Field, create Amount Clean, and enter REPLACE([Amount], "$", "").

  3. Convert Amount Clean to the Number (Whole Number) data type.

  4. To summarize the data, add an Aggregate step, group by Customer Name, set Order ID to Count, and set Amount Clean to Sum.

The expected cleaned output before aggregation is:

Order ID Customer Name Amount Clean
1001 Acme Ltd 250
1002 Beta LLC 100
1003 Beta LLC 75

Without the Aggregate step, the output retains one row per order. With the aggregation configured above, the output changes to one row per customer:

Customer Name Order Count Total Sales
Acme Ltd 1 250
Beta LLC 2 175

Relationship With Tableau Desktop

Tableau Prep handles upstream data engineering, while Tableau Desktop handles visual analysis.

Stage Primary responsibility
Tableau Prep Cleaning, joining, reshaping, deduplication, and pre-aggregation
Tableau Desktop Charts, dashboard interactions, calculated fields, parameters, table calculations, and LOD expressions
Tableau Server/Cloud Publishing, sharing, governance, and permissions
Tableau Prep Conductor Scheduling and monitoring prepared flows

For Tableau calculations, remember:

  • Tableau data-source filters and context filters are evaluated before FIXED LOD expressions.

  • Regular dimension filters are evaluated after FIXED and INCLUDE/EXCLUDE LOD expressions.

  • Table calculations run after the records visible at their addressing level have been established.

  • A Tableau calculation cannot restore detail removed by an upstream Tableau Prep aggregation.

Best Practices and Common Pitfalls

  • Validate row counts: Compare source and output counts after joins. Many-to-many relationships can unexpectedly multiply records.

  • Join on stable business keys: Prefer identifiers such as Customer ID over names, which may contain spelling and spacing differences.

  • Avoid premature aggregation: Aggregating in Prep can prevent analysts from answering questions that require transaction-level detail.

  • Keep a consistent grain: Document whether a flow outputs one row per order, customer, month, or another business entity.

  • Improve performance: Select only required columns, avoid row-expanding joins and unnecessary unions, use appropriately sized extracts for large transformations, and publish Hyper extracts for repeated analytical use.

  • Use Conductor for governed operations: Schedule critical flows through Tableau Prep Conductor rather than relying on unattended local desktops.

  • Manage credentials carefully: Use approved authentication and secret-management options instead of embedding sensitive passwords in flows.

  • Check outputs in Tableau: Validate null handling, totals, filters, and dashboard assumptions before publishing the prepared dataset.

3

Which data sources can Tableau connect to?

Tableau can connect to files, databases, cloud platforms, business applications, and custom or unsupported systems through its connectors, ODBC/JDBC, or the Tableau Connector SDK. The exact connector set varies between Tableau Desktop, Tableau Prep, Tableau Server, and Tableau Cloud.

Read full answer

Applies toTableau Desktop, Prep, Server, and Cloud (current release)

Main Source Categories

Category Common sources Typical use
Spreadsheet and delimited files Microsoft Excel, CSV, TSV, text files Ad hoc analysis and small data extracts
Structured and semi-structured files JSON, PDF, Hyper, statistical files Application data, reports, and locally stored datasets
Relational databases Microsoft SQL Server, PostgreSQL, MySQL, Oracle, IBM Db2, Google BigQuery, Amazon Redshift, Snowflake, SAP HANA Enterprise reporting and governed data
Cloud storage and collaboration Amazon S3, Google Cloud Storage, Microsoft OneDrive, SharePoint Online, Google Drive Shared and centrally managed files
Business applications Salesforce, Google Sheets, SAP systems CRM, finance, collaboration, and operational reporting
Analytical engines Databricks, Apache Spark, Microsoft Analysis Services Big-data and OLAP analysis
Other sources Web data, spatial files, geospatial databases, ODBC/JDBC data, custom Tableau connectors Specialized and unsupported sources

These examples are not exhaustive. Available connectors can differ by Tableau product, platform, hosting model, and release, so administrators should verify the connector in the product being deployed.

How to Connect in Tableau

In Tableau Desktop:

  1. Select Connect in the left navigation pane.

  2. Choose To a Server or To a File.

  3. Select the required connector, such as Excel, PostgreSQL, Snowflake, or Salesforce.

  4. Enter the server, authentication, database, and other connection details.

  5. Select the tables to connect, define relationships or joins, and choose Live or Extract.

In Tableau Prep:

  1. Select Connect on the Home screen.

  2. Choose a connector or select More to see additional connectors.

  3. Configure the connection and authentication details.

  4. Add the input to the flow and use profile, clean, join, and aggregation steps.

  5. Publish the flow or its output to Tableau Server or Tableau Cloud.

For a database, test the credentials before importing data. Private-network sources reached by Tableau Cloud commonly require Tableau Bridge or another supported connectivity service.

Live Connections and Extracts

  • Live connection: Tableau sends queries to the underlying source and refreshes the visualization when the workbook is opened or refreshed. It provides current data but depends on source availability and query performance.

  • Extract: Tableau downloads data into Tableau’s Hyper engine. Extracts are generally faster for dashboards and large historical datasets, but they require a scheduled refresh to remain current.

Tableau Server and Tableau Cloud do not provide the same source-authoring interface as Desktop and Prep. They host published workbooks, data sources, and Prep flows; however, live refreshes still require the hosting environment to access the underlying source.

Business Example

Suppose an analyst needs order data from SQL Server and customer data from Salesforce:

Orders source Order ID Customer ID Amount
SQL Server 101 C01 250
SQL Server 102 C02 400
Accounts source Customer ID Customer Name Segment
Salesforce C01 Acme Ltd Enterprise
Salesforce C02 Bright Co. SMB

After connecting to both systems, Tableau can create a relationship using Customer ID. The resulting combined dataset is:

Order ID Customer Name Segment Amount
101 Acme Ltd Enterprise 250
102 Bright Co. SMB 400

A relationship preserves the source tables and enables Tableau to determine the required joins. A physical join combines matching records into a single table and can increase extract size.

Best Practices

  • Prefer governed data sources: Use a database or shared platform rather than repeatedly connecting to personal spreadsheets.

  • Choose live or extract deliberately: Use live connections for frequently changing, transactional data; use extracts for large historical datasets and dashboard performance.

  • Limit extract scope: Filter by relevant date ranges and fields before creating large extracts.

  • Avoid unnecessary joins: Use relationships where supported and remove fields that are not needed for the visualization.

  • Test performance early: Examine the underlying database and Tableau’s query performance before publishing a dashboard.

  • Manage credentials securely: Use service accounts, encrypted credentials, and least-privilege permissions.

  • Design for clarity: Join tables around a documented business key and label ambiguous fields clearly.

4

Tableau live connection vs. extract?

A live connection queries the underlying database whenever Tableau needs data, while an extract stores a snapshot of the source data in Tableau’s Hyper engine. Live connections provide fresher data and keep large datasets in the source system; extracts improve dashboard performance, reduce database load, and can be refreshed on a schedule.

Read full answer

Applies toTableau Desktop, Tableau Prep, Tableau Server, and Tableau Cloud (current release)

Core Differences

Area Live connection Extract
Data storage Data remains in the source system Data is copied into a Tableau Hyper extract
Data access Tableau sends queries to the source Tableau reads from the stored Hyper extract
Freshness Usually reflects the source when queried Reflects the data at the last refresh
Performance Depends on source performance, network latency, and query complexity Often faster and more predictable for large datasets
Source load Each view can generate database queries Reduces source load after the refresh
Connectivity Requires ongoing access to the source Users can query the extract without accessing the source
Security Source permissions and credentials remain important The extract contains a copy of the data and requires appropriate access controls
Refresh Happens when Tableau queries the source Can be manual, scheduled, or incremental where supported

A live connection does not guarantee real-time data. The result still depends on source-system updates, transaction timing, Tableau query execution, and any caching.

How Connections and Refreshes Work

  • Live connection: In Tableau Desktop, select the source and choose the live option when prompted. Tableau sends visual queries to the database and retrieves only the data needed for the view. Users need valid source credentials and network access.

  • Extract: Tableau queries the source and saves the resulting data as a Hyper extract. In Tableau Desktop, extracts can be refreshed manually or configured to refresh under supported conditions.

  • Tableau Server and Tableau Cloud: Administrators can configure scheduled full or incremental extract refreshes. Incremental refresh can append new rows or, where supported, replace matching rows with updated data.

  • Tableau Prep: Prep can prepare data and write outputs such as Hyper extracts, CSV files, or relational tables. A Hyper output published to Tableau Server or Tableau Cloud becomes a Tableau data source backed by an extract; Tableau Prep Conductor manages scheduled flow execution and monitoring.

  • Published live data sources: Tableau Server or Tableau Cloud stores the connection configuration and uses the configured credentials to query the source.

Extracts provide faster dashboards because Tableau does not repeatedly wait for the source database. However, building and refreshing a large extract consumes resources and storage.

Business Example

Suppose an extract is refreshed at 08:00 and the source contains these sales records:

Refresh Time Region Sales
08:00 East 100
08:00 West 80

At 09:00, another order of 20 is added to the source:

Data State Region Sales
Current source East 120
Current source West 80

Expected dashboard results are:

  • Live connection: East shows 120 and West shows 80 when Tableau queries the source.

  • Extract before refresh: East still shows 100 and West shows 80.

  • Extract after refresh: East changes to 120 and West remains 80.

The extract is therefore a controlled snapshot, not a continuously synchronized copy.

Calculated Fields, LOD Expressions, and Performance

  • Calculated fields use the same Tableau syntax for live data and extracts.

  • Simple calculations can often be pushed down to a live database. Extract calculations are generally evaluated by Tableau using Hyper.

  • Tableau evaluates context filters before FIXED LOD expressions, ordinary dimension filters after FIXED expressions, and INCLUDE or EXCLUDE expressions after ordinary dimension filters. Consequently, an ordinary dimension filter does not change a FIXED result, while a context filter can.

  • Table calculations run after aggregation and produce results based on the marks in the view.

  • An extract refresh changes the input data but does not change Tableau’s calculation or filter order.

For large extracts, limit the rows and columns loaded, aggregate only when appropriate, and use incremental refresh where the source supports it.

Best Practices

  • Use a live connection for operational dashboards requiring current data, small or indexed datasets, or source systems that can handle interactive queries.

  • Use an extract for large historical datasets, broad executive dashboards, predictable performance, or reduced pressure on the source database.

  • Schedule extracts when users can tolerate refresh latency; otherwise consider live connections.

  • Avoid creating many extracts over the same source when a shared, governed published data source would be easier to maintain.

  • Apply row-level security carefully because extracts contain copied data.

  • Use extracts for performance, not as a substitute for proper data modelling, indexing, or efficient source queries.

5

What is a Tableau Hyper extract?

A Tableau Hyper extract is a persisted snapshot of source data stored in Tableau’s columnar Hyper database format, usually with the .hyper extension. It lets Tableau aggregate locally instead of repeatedly querying the original source, which can improve report performance while introducing a refresh and data-freshness requirement.

Read full answer

Applies toTableau Desktop (current release), Tableau Server (current release), Tableau Cloud (current release), and Tableau Prep (current release)

How a Hyper Extract Works

Tableau separates the original data from the extract:

  • Live connection: Tableau sends queries to the source database whenever the workbook needs data.

  • Extract connection: Tableau queries a local or server-side .hyper file.

  • Aggregation: Measures such as SUM([Sales]) can be calculated from the extract without scanning the original system.

  • Metadata: Tableau retains the information needed to interpret the extract, while calculated fields are normally evaluated when the workbook queries it.

Hyper uses columnar storage and compression, making it efficient for analytical workloads containing many rows but fewer relevant columns.

Creating and Using an Extract

In Tableau Desktop:

  1. Connect to the source and select the data source in the Data pane.

  2. Right-click the data source and choose Extract Data… (in older releases the same command appears as Data > Extract Data…).

  3. In the Extract Data dialog, choose whether to extract all rows or only selected rows.

  4. Apply any extract filters, such as a date range.

  5. Save the extract; Tableau writes a .hyper file into the workbook’s Extracts folder.

  6. To update it, right-click the data source and choose Refresh, or schedule an automated refresh for hosted extracts on Tableau Server or Tableau Cloud.

Tableau Server and Tableau Cloud can host extracts and schedule refreshes. Tableau Prep can prepare data and publish flows to Server or Cloud, where the output is published as a Hyper extract.

A full refresh rebuilds the extract from the source. Incremental refresh can append new records and replace changed records when the source supports it and the workbook defines an appropriate key or date field.

Business Example

Suppose the source contains these orders:

Order Date Region Product Sales
2025-01-10 East Keyboard 150
2025-01-11 West Monitor 300
2025-01-12 East Monitor 200
2025-01-13 West Keyboard 50

A Hyper extract stores these four rows. A Tableau view with Region on Rows and SUM([Sales]) on Columns produces:

Region Total Sales
East 350
West 350
Grand Total 700

Tableau can calculate those regional totals directly from the extract rather than sending another aggregation query to the source system.

Live Connection or Hyper Extract?

Consideration Live Connection Hyper Extract
Data freshness Reflects changes immediately Reflects changes after refresh
Query location Source database Local or hosted .hyper file
Network dependency High Lower during dashboard use
Performance Depends on source latency and capacity Often faster for large aggregations
Server load Source receives every query Tableau queries the extract
Maintenance Usually simpler Requires refresh scheduling and monitoring

Use a live connection for real-time operational data, rapidly changing events, or sources that handle analytical queries efficiently. Prefer an extract when dashboard performance is more important than immediate freshness or when the source has limited query capacity.

Best Practices and Common Pitfalls

  • Refresh extracts regularly: Set refresh frequency according to how quickly the data changes and the available Tableau Server or Cloud refresh windows.

  • Avoid unnecessary columns: Hyper is columnar, so removing unused fields can reduce storage and improve query performance.

  • Use incremental refresh carefully: It requires a reliable unique key, a supported append operation, and a strategy for deleted records.

  • Monitor refresh failures: A stale extract can produce an apparently valid dashboard with incorrect business results.

  • Use clear source semantics: Format dates consistently and distinguish numeric measures from numeric identifiers before creating the extract.

  • Do not assume filters behave identically: Tableau applies extract and data-source filters before FIXED LOD expressions; context filters follow, then INCLUDE and EXCLUDE LODs, dimension filters, and table calculations. Dimension filters therefore do not normally restrict FIXED LOD calculations.

  • Prefer extracts for heavy aggregations: For high-volume dashboards, extracts often reduce load on operational databases. Validate representative performance rather than assuming every extract will be faster.

  • Keep calculation logic visible: Calculated fields remain part of the workbook’s analytical model, so document business definitions such as revenue, margin, and active customer alongside the extract refresh process.

6

How do Tableau relationships, joins, and blends differ?

Relationships, physical joins, and blends are Tableau’s three ways of combining data, but they differ in scope, execution, and control over unmatched or duplicate rows. A relationship preserves a logical data model, a physical join combines tables into one logical table, and a blend combines fields from separate data sources at worksheet level.

Read full answer

Applies toTableau Desktop 2025.1, Tableau Prep 2025.1, Tableau Server 2025.1, and Tableau Cloud 2025.1

Core Differences

Mechanism Scope How Tableau handles it Main consideration
Relationship Tables within one data source Tableau generates the required joins at query time while keeping the tables logically separate Best for star schemas and one-to-one or many-to-one relationships
Physical join Tables within one data source Tableau combines tables into one logical table using an inner, left, right, or full outer join Provides explicit control over unmatched rows and can create duplicates
Blend Fields from separate data sources Tableau matches a secondary source to a primary source when executing the worksheet query Useful across databases or published sources, but duplicate secondary keys can expand rows

A Tableau relationship supports one-to-one and many-to-one relationships. It generally represents the “many” table as the primary table and the “one” table as its lookup table. For many-to-many relationships, redesign the model, pre-aggregate the data, or use a blend carefully.

How to Configure Each Mechanism

  • Relationship

  • Go to the Data Source tab and select Add a Relationship.

  • Choose the related tables, matching field pairs, and relationship type.

  • Tableau retains each table’s fields separately and generates SQL when the view is queried.

  • Calculated fields can reference fields from tables participating in the relationship.

  • Physical join

  • In the Data Source tab, add the tables and configure the Join clause.

  • Select the join type and matching fields.

  • Tableau treats the result as one logical table.

  • An inner join excludes unmatched records; a left join retains unmatched records from the left table.

  • Blend

  • Connect both sources and open Data > Edit Blends and Relationships.

  • Select the secondary source and define its matching fields against the primary source.

  • Drag fields from the secondary source into a view to use blended data.

  • A calculated field in the primary source can reference secondary-source fields, but a calculated field in the secondary source generally cannot reference primary-source fields.

Business Example

Assume an order analysis must be combined with customer attributes.

Orders

OrderID CustomerID Amount
1001 C1 120
1002 C2 80
1003 C1 60
1004 C9 70

Customers

CustomerID CustomerName Segment
C1 Alice Premium
C2 Bob Basic
C4 Dana Gold

Expected results:

Configuration Orders returned Treatment of C9 Treatment of C4
Left physical join 4 Retained with null customer attributes Excluded because it has no order
Inner physical join 3 Excluded Excluded
Many-to-one relationship using “Some records match” 4 Retained with null customer attributes Excluded
Blend with Orders as primary and Customers as secondary 4 Retained with null customer attributes Excluded

Thus, the left join, relationship, and blend produce the same order count in this example, but they represent different data-modeling decisions. A Customers-primary configuration would retain C4 with null order fields when no matching order exists.

Filters, LOD Expressions, and Order of Operations

  • Joins and relationships are resolved as part of constructing the logical query, before worksheet measures are aggregated.

  • Context filters are processed before ordinary dimension filters and can affect join or relationship matching.

  • Ordinary worksheet dimension filters generally apply after join or relationship processing. Data-source filters can restrict source rows earlier.

  • Measure filters operate on aggregated values and therefore run after dimension filters.

  • For blends, primary-source filters are applied before blending. Ordinary secondary-source filters are applied after blending; adding a secondary-source field to context applies that filter before blending.

  • A FIXED LOD expression is calculated before ordinary dimension filters. Context-filter dimensions are included in its context.

  • INCLUDE and EXCLUDE LOD expressions are evaluated after ordinary dimension filters.

  • Table calculations operate after the underlying rows, relationships, blends, and aggregations have been evaluated.

Best Practices and Tool Coverage

  • Desktop: Prefer relationships for conventional star schemas because they preserve modularity and avoid an unnecessarily large physical join.

  • Prep: Use a Join step to combine and validate inputs before publishing. Pre-aggregate many-to-many data before bringing it into a dashboard.

  • Server and Cloud: Publish prepared data sources or workbooks with the relationships, joins, or blends already configured. Permissions still apply independently to every source involved in a blend.

  • Confirm that blend keys are unique at the intended grain. If one customer has three matching rows in the secondary source, three blended records may be returned.

  • Use extracts for frequently accessed large datasets and complex joins, but refresh them regularly when source data changes.

  • Clearly label the row grain and indicate null or unmatched records so viewers do not mistake missing customer attributes for missing orders.

7

What are Tableau’s logical and physical data model layers?

Tableau’s logical layer defines the workbook-facing model: logical tables, relationships, dimensions, measures and calculated fields. The physical layer identifies the underlying data sources and any physical joins used to retrieve rows.

Read full answer

Applies toTableau Desktop, Prep, Cloud, and Server (current releases)

Core Difference

Layer Main responsibility Typical contents
Physical layer Specifies where the data comes from and how source tables are physically combined Database connections, Excel files, published data sources, extracts, physical joins and custom SQL
Logical layer Defines how the data should be interpreted in the workbook Logical tables, relationships, dimensions, measures, calculated fields, groups, bins and sets

A physical join combines rows according to join conditions and can duplicate records when join keys are not unique. A logical relationship keeps tables conceptually separate while allowing Tableau to generate the required SQL joins when a view is evaluated.

“Physical” does not mean Tableau always stores the source data itself. With a live connection, the database remains the physical source; with an extract, Tableau stores the extracted data using its Hyper engine.

Business Example

Suppose the source contains these tables:

Orders

Order ID Customer ID Order Date Sales
1001 C10 2025-01-05 120
1002 C20 2025-01-06 80

Customers

Customer ID Segment
C10 Retail
C20 Wholesale

In Tableau Desktop:

  1. Connect to the source containing Orders and Customers.

  2. On the Data Source tab, ensure you are in the logical layer (Relationships view).

  3. If Tableau does not create the relationship automatically, drag Customers.Customer ID onto Orders.Customer ID to create a relationship.

  4. Configure it as a one-to-many relationship: the customer table is the one side, and the order table is the many side.

  5. Verify that Customer ID and Segment are dimensions and Sales is a measure (Tableau assigns these automatically based on data type).

The relationship allows Segment from Customers to be used with Sales from Orders without permanently flattening the two tables into one joined result.

Create a calculated field named Revenue through Analysis > Create Calculated Field with:

SUM([Sales])

Drag Segment to Columns and Revenue to Rows. The expected result is:

Segment Revenue
Retail 120
Wholesale 80
Grand Total 200

How Tableau Evaluates the Model

  1. Physical retrieval: Tableau reads from the database or extract and applies the required physical join behavior.

  2. Logical relationship processing: Tableau identifies related tables and determines the records needed for the view.

  3. Aggregation: Measures such as SUM([Sales]) are calculated at the level defined by the view and filters.

  4. Visualization: The resulting dimensions and measures populate the worksheet.

Calculated fields are normally created in the logical model and evaluated against data retrieved through the physical layer. Calculated fields do not change the underlying source tables unless the source itself is modified.

Filters, LODs, and Order of Operations

The order matters when filters and LOD expressions are combined:

  • Extract filters are applied when the extract is created.

  • Live source filters are applied as part of the data request.

  • FIXED LOD expressions are calculated before regular dimension filters. Context filters are evaluated before FIXED expressions.

  • INCLUDE and EXCLUDE LOD expressions are calculated after dimension filters.

  • Table calculations operate on the already aggregated result, generally after dimension filters.

For example, a FIXED expression such as FIXED [Customer ID] : SUM([Sales]) computes customer totals before a normal filter removes displayed customer rows. An INCLUDE expression follows regular dimension filters. This difference can change the values shown and should be tested explicitly.

Desktop, Prep, Cloud, and Server

  • Tableau Desktop: Provides the clearest implementation of the two-layer model through the Data Model pane.

  • Tableau Prep: Acts primarily as an upstream data-preparation environment. It can configure joins and relationships and publish cleaned outputs, but its builder workflow is not identical to Desktop’s logical/physical model interface.

  • Tableau Cloud and Server: Publish the workbook or data source containing the logical model. For live data, the physical source remains the external database; for extracts, Hyper is the physical storage engine.

  • Published extracts: Retain the logical tables, relationships and calculations needed to interpret the data, even though the underlying rows are stored in the extract.

Best Practices

  • Prefer logical relationships for modular models; use physical joins deliberately when source-specific behavior or an existing upstream join is required.

  • Validate that dimension-side join keys are unique. Duplicate keys can multiply measures and produce incorrect totals.

  • Keep dimensions and measures semantically consistent. A date or customer identifier is normally a dimension; an amount that can be summed is normally a measure.

  • Use FIXED LOD expressions sparingly because they can limit query optimization and prevent filters from being pushed into the source.

  • Test filters and LOD expressions together, documenting the expected order of evaluation.

  • Use extracts for large datasets or frequently accessed dashboards, and avoid unnecessary row-level calculations in views.

8

What is the difference between dimensions and measures in Tableau?

In Tableau, a dimension identifies how data should be grouped or categorized, while a measure represents a numeric value that can be aggregated for analysis. Tableau displays dimensions with blue pills and measures with green pills by default.

Read full answer

Applies toTableau Desktop, Tableau Server, and Tableau Cloud (current releases)

Core Difference

Tableau field role Purpose Common examples Typical use
Dimension Answers “by what?” or provides descriptive context Region, Product, Customer, Order Date, status Grouping, filtering, segmentation
Measure Answers “what value?” or “how much?” Sales, Profit, Quantity, Cost Sum, average, minimum, maximum and other aggregations

A field’s role does not always match its underlying data type:

  • A numeric field can be used as a discrete dimension, such as an individual rating code or year.

  • A date can be used as a dimension for discrete or continuous date comparisons or as a measure when its numeric date value is relevant.

  • Discrete versus continuous controls how values are displayed, while dimension versus measure controls grouping versus aggregation. Tableau can change a field’s discrete or continuous treatment in a view without changing its underlying data type.

Business Example

Suppose the Orders data source contains:

Region Product Sales Profit
East Product A 120 24
West Product B 80 16
East Product B 40 4
  • Region and Product are dimensions.

  • Sales and Profit are measures.

  • Place Region on Rows and SUM(Sales) on Columns.

The expected result is:

Region Sum of Sales
East 160
West 80

When Sales is dragged into a view, Tableau normally aggregates it as SUM(Sales). Change the aggregation from the pill menu when the metric requires AVG, MIN, MAX, COUNT, or COUNTD.

Calculated Field Example

Calculated fields should normally aggregate measures before performing calculations. To create a regional profit margin, choose Analysis > Create Calculated Field and enter IF SUM([Sales]) > 0 THEN SUM([Profit]) / SUM([Sales]) END.

This aggregate calculation behaves as a measure in the view. Aggregating the numerator and denominator first avoids the incorrect result that can occur when row-level profit percentages are averaged or summed.

From the sample data, the expected profit margins are:

Region Profit margin
East 17.5%
West 20.0%

The IF condition prevents division by zero and returns null when sales are not positive. Format the calculated field as a percentage in Tableau.

Filters, LOD Expressions, and Table Calculations

Tableau’s calculation order matters when dimensions, measures, filters, and LOD expressions are combined:

  • FIXED LOD expressions are evaluated before ordinary dimension filters, so those filters do not change the fixed result. Context filters and data-source filters can affect a FIXED result.

  • INCLUDE and EXCLUDE LOD expressions are evaluated after dimension filters and operate at the level defined by their dimensions and keywords.

  • Table calculations run after filters and LOD calculations. A percent-of-total calculation therefore operates on the values remaining in the current view.

For example, SUM([Sales]) / TOTAL(SUM([Sales])) calculates each value’s share of the total in the current view. By contrast, SUM([Sales]) / FIXED([Region], SUM([Sales])) calculates each row’s sales as a share of its region’s sales. The fixed denominator is unaffected by ordinary dimension filters, although context filters can affect it.

Best Practices

  • Model data at a clear grain: Store one row per order, transaction, or other business event, then relate dimensions such as customer, product, and date.

  • Use dimensions for descriptive fields and measures for business metrics.

  • Choose the appropriate aggregation: SUM(Sales) and AVG(Sales) answer different questions and must not be treated as interchangeable.

  • Avoid summing ratios: A calculated percentage of profit is generally non-additive; calculate it from aggregated numerator and denominator values.

  • Keep calculations understandable: Use descriptive names such as Profit Margin rather than names such as Calculation_1.

  • Validate at multiple levels: Check totals against source-system reports before publishing dashboards to Tableau Server or Tableau Cloud.

9

How do discrete and continuous fields differ in Tableau?

Discrete fields represent values as separate categories or members, while continuous fields represent values as positions on an ordered scale. In Tableau, this distinction affects how fields are displayed, grouped, filtered, and aggregated.

Read full answer

Applies toTableau Desktop current release

Core Difference

Characteristic Discrete field Continuous field
Values Separate categories or exact-value members Numeric or date values positioned on a scale
Examples Region, product category, customer ID Sales amount, profit, temperature, date
Typical axis Categorical axis with separate labels Numerical or date axis representing magnitude
Typical aggregation Often counted or used to group records Often summed, averaged, or otherwise aggregated
Filtering Selects particular members Supports ranges, thresholds, and relative-date conditions
Axis behaviour One position per member Position determined by the value’s scale

For example, Region is naturally discrete because East, West, and other regions are separate categories. Sales Amount is naturally continuous because values such as 100, 250, and 1,200 have meaningful numerical positions and can be aggregated or compared.

How Tableau Assigns Field Types

Tableau uses two related but separate concepts: dimension versus measure and discrete versus continuous.

  • Default assignment: Tableau normally loads text and date fields as discrete dimensions and numeric fields as continuous measures. Date fields can also be used as continuous date scales.

  • Convert to Discrete: Treats each exact value as a separate member. Converting Sales Amount to discrete creates member values such as 100 and 250, rather than plotting transactions along a numerical scale.

  • Convert to Continuous: Places an eligible discrete numeric or date field on a continuous scale. Use this only when the underlying values support a meaningful numerical or date scale; nonnumeric labels should remain discrete.

  • Create Bins: Groups continuous numeric values into ranges, such as 0–99, 100–499, and 500+. Date values can also be grouped into date bins.

  • Create Groups: Combines selected discrete members into broader categories, such as grouping several product subcategories under one group.

Discrete or continuous status is therefore not identical to dimension or measure status. Tableau permits continuous dimensions and discrete measures, although most reporting conventionally uses discrete dimensions with continuous measures.

Sample Data and Expected Results

Order ID Region Product Sales Amount
O-001 East A 100
O-002 West B 150
O-003 East A 100
View Field treatment Expected result
Region totals Region discrete; SUM(Sales Amount) continuous East = 200; West = 150
Order count Region discrete; COUNTD(Order ID) East = 2 orders; West = 1 order
Discrete sales amounts Sales Amount converted to discrete Two members: 100 on two records and 150 on one record
Manual sales ranges Sales Amount binned as continuous 0–99: 0 records; 100–499: 2 records; 500+: 0 records

Changing a field from continuous to discrete does not change its source data. It changes how Tableau interprets, groups, and displays the values.

Filters, LOD Expressions, and Order of Operations

Discrete fields are useful for exact selections such as Region = East. Continuous fields are useful for conditions such as Sales Amount >= 500, numerical ranges, and date-range conditions. A Top N filter is different: it ranks members of a discrete dimension, such as customers, by a measure or aggregate.

Tableau’s documented order is:

  1. Extract filters.

  2. Data-source filters.

  3. Context filters.

  4. FIXED LOD expressions.

  5. Dimension filters.

  6. Measure filters.

  7. Table calculations, including INCLUDE and EXCLUDE LOD expressions.

Because a FIXED LOD is evaluated before dimension filters, filtering a dimension after the LOD may not change its result. Adding that dimension to context moves the filter before the FIXED calculation and can therefore change it. INCLUDE and EXCLUDE behave as table calculations and run after dimension filters.

Best Practices

  • Keep high-cardinality identifiers discrete when they represent individual records or categories.

  • Avoid converting a continuous measure with many unique values into a discrete dimension unless exact-value grouping is required.

  • Use bins for readable ranges, with boundaries aligned to the business question.

  • Preserve raw continuous measures for calculations and create separate grouped or discretized fields for presentation.

  • Format continuous fields as currency, percentage, decimal, or date according to their analytical purpose.

  • Label grouped, binned, and discretized fields clearly so users understand whether they represent exact values, categories, or ranges.

  • Use context filters carefully because they can change LOD and aggregation results and may increase query complexity.

10

What do blue and green pills mean in Tableau?

In Tableau, blue pills represent continuous fields, while green pills represent discrete fields in the current view. Continuous fields support aggregation and numeric or temporal scales; discrete fields act as categories or grouping labels.

Read full answer

Applies toTableau Desktop, Tableau Cloud, and Tableau Server (current releases)

Meaning of the Colors

Pill color Tableau role Typical examples
Blue Continuous field SUM(Sales), AVG(Margin), a continuous date axis
Green Discrete field Region, Category, YEAR(Order Date), calculated labels

In the Data pane, Tableau also organizes fields under Dimensions and Measures. Dimensions are commonly shown in green, and measures in blue, but these concepts are related rather than identical. Tableau can change how a field behaves after it is dragged into a view. The most reliable indicators are the aggregation prefix shown in the pill and the field’s current aggregation type.

A pill’s color is not the color used for marks on the chart. For example, SUM(Sales) may produce a blue pill but appear as orange bars in a view.

Business Example

Assume the source data contains:

Region Sales
East 120
North 180
West 200

In Tableau Desktop:

  1. Drag Region onto Rows.

  2. Drag Sales onto Columns.

  3. Tableau creates SUM(Sales) automatically.

The view displays:

Region SUM(Sales)
East 120
North 180
West 200
Grand Total 500

Region appears as a green discrete pill, while SUM(Sales) appears as a blue continuous pill.

Creating Discrete Calculated Fields

A calculated field producing text is normally treated as a dimension and therefore appears as a discrete green pill. For example:

IF [Sales] >= 150 THEN "High Value" ELSE "Standard" END

Create it through Data pane → right-click a field → Create → Calculated Field. Dragging it onto Rows produces:

Region Order Category
East Standard
North High Value
West High Value

To change a field’s role, right-click its pill and use Convert to Discrete or Convert to Continuous where Tableau permits it. For dates, the context menu also provides date parts such as Month, Quarter, and Year, which are commonly used as discrete categories.

Filters and Order of Operations

Pill color does not change the calculation order. Tableau’s simplified order of operations is:

Extract filters → data source filters → context filters → FIXED LOD → dimension filters → INCLUDE LOD → EXCLUDE LOD → measure filters → table calculations

Important consequences include:

  • Dimension filters normally filter the rows used by ordinary aggregations.

  • Measure filters operate on aggregated measure values and therefore are not equivalent to applying the same condition to raw data rows.

  • FIXED LOD calculations run before non-context dimension filters.

  • INCLUDE and EXCLUDE LOD calculations run after dimension filters.

  • Table calculations, such as running totals and rankings, run after query processing.

Best Practices and Platform Notes

  • Use discrete dimensions for categories and continuous measures for aggregations; avoid converting IDs or high-cardinality fields unnecessarily.

  • Keep calculated fields simple where possible, especially calculations used across many rows. Excessive string calculations and high-cardinality dimensions can slow rendering.

  • Validate joins in Tableau Prep or Tableau Desktop and prefer a modeled star schema over denormalized or many-to-many relationships without appropriate join conditions.

  • Use extracts for large, stable datasets where performance matters more than real-time refresh; use live connections when data freshness is essential.

  • Tableau Prep uses data types and dimension/measure roles rather than the same shelf pills. Tableau Cloud and Server preserve the field semantics and calculations, although published read-only dashboards expose the resulting visualization rather than all authoring controls.

11

How does aggregation work in Tableau?

Aggregation in Tableau combines source rows into summarized values at the view’s current level of detail. Dimensions define the groups, while aggregate functions calculate measures such as SUM, AVG, or COUNTD within those groups.

Read full answer

Applies toTableau Desktop, Tableau Server, Tableau Cloud, and Tableau Prep (current releases)

How It Works

  • Dimensions determine how rows are grouped, such as by Region, Month, or Customer.

  • Measures are aggregated for each group. Continuous numeric fields normally default to SUM when placed on a quantitative shelf.

  • Discrete versus continuous controls how a field is represented in the view; it does not select the aggregate function.

  • Adding a dimension changes the level of detail, so the same measure may produce different results.

  • Calculated fields can either aggregate row-level values directly or contain an existing aggregate expression.

For example, a view containing Region and SUM([Sales Amount]) produces one total sales value for each region.

Common Aggregate Functions

Function Purpose Business example
SUM([Field]) Adds values Total revenue
AVG([Field]) Calculates the arithmetic mean Average order value
MIN([Field]) Finds the smallest value Lowest sale
MAX([Field]) Finds the largest value Highest sale
COUNT([Field]) Counts non-null values Populated orders
COUNTD([Field]) Counts distinct values Unique customers
MEDIAN([Field]) Finds the median Typical transaction value
STDEV([Field]) Calculates sample standard deviation Sales variability
VAR([Field]) Calculates sample variance Statistical analysis

STDEVP and VARP are the corresponding population functions.

Filters, LODs, and Table Calculations

Tableau evaluates calculations in this order:

  1. Extract filters.

  2. Data-source filters.

  3. Context filters.

  4. FIXED level-of-detail expressions.

  5. Dimension filters.

  6. INCLUDE and EXCLUDE LOD expressions.

  7. Measure filters.

  8. Table calculations.

Consequently, an ordinary dimension filter does not change a FIXED result because FIXED expressions are evaluated first. A context filter can change a FIXED result because context filters run earlier. Dimension filters, however, affect INCLUDE and EXCLUDE expressions because they run before them.

Table calculations are different from ordinary aggregation. They operate on the already aggregated query results, so functions such as RUNNING_SUM, RANK, and WINDOW_AVG calculate across marks according to the table calculation’s addressing and partitioning settings.

Aggregation Example

Suppose the source data is:

Region Month Sales Amount
East January 6,000
East February 5,000
West January 7,000
West February 4,000

In Tableau Desktop, create a calculated field named Revenue Band with the formula IF SUM([Sales Amount]) >= 10000 THEN "High" ELSE "Standard" END.

Place Region on Rows, SUM([Sales Amount]) on Text, and Revenue Band on Color or Text. The expected result is:

Region Sum of Sales Amount Revenue Band
East 11,000 High
West 11,000 High

The calculation aggregates rows at the current view level before evaluating the condition. Adding Month to Rows creates separate regional-month aggregation contexts, so each row-level total would instead be classified as Standard.

Desktop, Prep, Server, and Cloud

  • Tableau Desktop and the web authoring interfaces in Server and Cloud use the same core aggregation model.

  • Tableau Prep aggregates rows during data preparation through its Aggregate step. This changes the output grain before the data is used in published workbooks; it is different from view-time aggregation.

  • Tableau Server and Tableau Cloud evaluate published workbooks using Tableau’s aggregation and query engine. Filters and permissions can change the values users see, but they do not introduce a separate aggregation model.

Best Practices

  • Match the function to the metric: Use SUM for totals, AVG for averages, and COUNTD for unique entities.

  • Avoid mixing aggregation levels: SUM([Sales Amount]) + [Discount Amount] is invalid when [Discount Amount] is row-level and non-aggregate. Use SUM([Sales Amount]) - SUM([Discount Amount]) instead.

  • Model the correct grain: Incorrect joins or relationships can duplicate source rows and distort aggregates.

  • Optimize large datasets: Use extracts when they improve performance, keep filters selective, and use Prep’s Aggregate step when pre-aggregation is appropriate.

  • Treat distinct counts carefully: COUNTD on high-cardinality fields can be computationally expensive.

  • Label values clearly: Use labels such as Revenue (SUM) or Average Order Value so users understand the aggregation level.

12

How do Tableau worksheets, dashboards and stories differ?

A worksheet is Tableau’s single-view analysis building block, a dashboard combines multiple worksheets and objects into one interactive page, and a story arranges dashboards and worksheets into a guided, narrated sequence of slides. They form three levels: analyse with worksheets, present with dashboards, and narrate with stories.

Read full answer

Applies toTableau Desktop and Tableau Server (current release); Tableau Cloud (current release, worksheets and dashboards only)

How They Work

  • Worksheet: Select a data source and choose Sheet > New Worksheet, then drag fields onto the Rows and Columns shelves and configure the Marks, Filters, Parameters and Tooltip cards. One worksheet represents one view, such as a bar chart, line chart, map or crosstab. It is where calculated fields, LOD expressions and table calculations are built and is the primary unit of reuse.

  • Dashboard: Choose Dashboard > New Dashboard to create a canvas containing worksheets, containers, text, images, web page objects and blank objects. Dashboard actions include Filter, Highlight, Parameter, Set, Go to Sheet and URL. Dashboards can use fixed canvas sizes and device layouts for different screen sizes.

  • Story: Choose Story > New Story, then add story points containing dashboards, worksheets, text, images or blank objects. Stories support captions, sequenced navigation and navigation buttons that can target a selected story point, allowing non-linear navigation. Tableau Cloud does not support stories.

Key Differences

Aspect Worksheet Dashboard Story
Purpose Explore and analyse one view Present several views interactively Tell a narrative sequence
Contents Fields, marks and encodings Worksheets, objects and containers Dashboards, worksheets, text and images
Interactivity Filters, parameters and highlights Worksheet controls and dashboard actions Navigation controls and supported actions
Sizing Standalone Fit options: Standard, Entire View or Page Dashboard canvas and device layouts Story-canvas sizing controls
Saving and publishing Saved as a worksheet within a workbook Saved as a dashboard page within a workbook Saved as a story page within a workbook where supported

Order of Operations

Tableau’s standard worksheet order is: extract filters → data source filters → context filters → FIXED LOD expressions → dimension filters → measure filters → table calculations and table-calculation filters.

A FIXED LOD is evaluated before ordinary dimension filters, so it normally ignores those filters. Adding its dimension to Context makes the context filter run earlier, causing the FIXED calculation to respond to it. INCLUDE and EXCLUDE establish different levels of detail and must not be assigned the FIXED rule verbatim.

An ordinary dashboard filter action acts like a dimension filter on its target worksheets. It does not automatically become a context filter, so adding it to a dashboard does not by itself change a target’s FIXED LOD result.

Typical Business Example

Sample sales data:

Region Product Month Sales Profit
East Widget 2024-07 100 30
East Gizmo 2024-08 80 20
West Widget 2024-07 120 40
West Gizmo 2024-08 60 10
  1. Worksheet: Plot SUM(Sales) by Region, coloured by Product. Use the valid calculated field Profit Margin = SUM([Profit]) / SUM([Sales]). The LOD expressions { FIXED [Region], [Product] : SUM([Sales]) } and { FIXED [Region] : SUM([Sales]) } return product-region values of 100, 80, 120 and 60 and regional values of 180 for both East and West.

  2. Dashboard: Combine the regional sales chart with a product filter using Apply to worksheets → All using this data source, a profit-margin worksheet and a Highlight action from the regional chart.

  3. Story: Create slides for the national trend, the regional dashboard and the top-products worksheet. Use navigation buttons to move directly to the detail slide.

Expected result: East and West each show sales of 180. Total sales are 360, total profit is 100, and the overall profit margin is 27.78%.

Best Practices and Common Pitfalls

  • Build worksheets first: Test each view independently before composing it into a dashboard.

  • Use Context deliberately: Use FIXED when a calculation should ignore ordinary dimension filters; add a dimension to Context only when the calculation should respond to that filter.

  • Control filter scope: Apply a worksheet filter to All using this data source only when every consumer needs it, because it changes the affected sheets’ results.

  • Keep dashboards responsive: Limit expensive worksheets and high-cardinality filters, and use extracts where they materially improve performance.

  • Choose the right container: Use a dashboard for interactive exploration and a story for a guided narrative. Give sheets meaningful end-user names because their names appear in tooltips, actions and tabs.

13

What are Tableau marks and the Marks card?

A mark is the visual object Tableau creates for each row of aggregated data, such as a bar, line, shape, or text label. The Marks card is the control panel used to choose the mark type and assign fields to visual properties such as color, size, shape, label, and tooltip.

Read full answer

Applies toTableau Desktop, Tableau Cloud, and Tableau Server (current releases); Tableau Prep (current release) for data preparation only

What Marks Represent

The fields placed on Rows and Columns determine where marks appear, while fields added to the Marks card determine how those marks look.

Common visual channels include:

  • Color: Encodes discrete fields as categories or continuous fields with a gradient.

  • Size: Scales a mark according to a continuous field, often a quantitative measure.

  • Shape: Assigns different symbols, often according to the members of a discrete field.

  • Label: Displays a field directly on or beside the mark.

  • Detail: Adds fields to the mark’s level of detail without changing its visible color, size, or shape.

  • Tooltip: Controls the information shown when a user hovers over a mark.

  • Path: Connects marks when a meaningful path is required, such as a line showing movement between points.

A mark usually corresponds to one row in Tableau’s aggregated result. For example, placing Category on Rows and SUM(Sales) on Columns creates one bar per category.

Using the Marks Card

  1. Build the view by dragging fields onto Rows, Columns, Marks, or the Label shelf.

  2. Select the mark type from the drop-down at the top of the Marks card, such as Bar, Line, Area, Shape, Text, Map, Pie, or Density.

  3. Drag fields onto properties such as Color, Size, Label, Detail, or Tooltip.

  4. Click a property to change its formatting, aggregation, color palette, scale, or tooltip content.

  5. If the Marks card is hidden, use View > Show Marks Card in Tableau Desktop.

Automatic mark type lets Tableau select an appropriate visualization. Selecting the mark type explicitly is preferable in production because it prevents unexpected changes when fields or data are added.

Discrete and continuous describe how Tableau treats a field, independently of whether it is a dimension or measure. Discrete fields generally split marks into categories, while continuous fields generally support axes, gradients, or proportional sizing. Tableau normally aggregates measures using functions such as SUM, AVG, or MIN; the selected aggregation is shown in the pill on the shelf.

Business Example

Use the following sample sales data:

Category Sales Profit
Technology 120,000 24,000
Furniture 90,000 13,500
Office Supplies 60,000 12,000

Create a calculated field named Profit Margin:

IF SUM([Sales]) = 0 THEN NULL ELSE SUM([Profit]) / SUM([Sales]) END

Then configure the view:

  • Drag Category to Rows.

  • Drag Sales to Columns; Tableau uses SUM(Sales).

  • Set the mark type to Bar.

  • Drag Profit Margin to Color.

  • Drag Sales to Label.

  • Format the color legend as percentages and the sales labels as currency.

The result is one bar per category. Technology has the longest bar at 120,000, Office Supplies the shortest at 60,000, and Furniture has the lowest profit margin at 15%. The color legend communicates margins from 15% to 20%.

Filters, LODs, and Order of Operations

Tableau evaluates most filters and calculations in a defined sequence:

  1. Extract filters

  2. Data-source filters

  3. Context filters

  4. FIXED LOD expressions

  5. INCLUDE LOD expressions

  6. EXCLUDE LOD expressions

  7. Dimension filters

  8. Table calculations

This means a normal dimension filter does not affect a FIXED LOD calculation because FIXED expressions are evaluated earlier. A context filter, however, is evaluated before FIXED expressions and can affect them. Table calculations run last and operate over the marks returned by the earlier stages, so their results can change when filters are added.

Best Practices and Platform Scope

  • Encode purposefully: Use color and size for important comparisons rather than assigning every available property.

  • Control aggregation: Confirm whether a measure should use SUM, AVG, MIN, or another aggregation.

  • Validate totals: Use a table calculation such as RUNNING_SUM(SUM([Sales])) only when a running total is actually required.

  • Model data before visualization: Prepare clean tables and sensible relationships in Tableau Prep or the data-source layer; the Marks card configures presentation, not data modelling.

  • Optimize extracts: Filter unnecessary rows and columns, and avoid excessive high-cardinality detail marks that can slow rendering.

  • Design for clarity: Sort bars meaningfully, format labels consistently, and use tooltips for secondary detail instead of overcrowding the view.

Tableau Prep does not have a Marks card because it prepares data rather than rendering marks. Tableau Desktop can publish workbooks to Tableau Cloud or Tableau Server, where the resulting views are hosted and rendered. Users with appropriate permissions can also author or edit supported views and mark properties through the web interface.

14

What are shelves in Tableau Desktop?

Shelves are the primary areas in a Tableau worksheet where you place fields to define the visualization’s structure. The two main shelves are Rows and Columns; fields placed there determine grouping, axes, and the direction in which marks are arranged.

Read full answer

Applies toTableau Desktop (all versions)

Main Shelves

Tableau area Purpose Typical fields
Rows shelf Defines the vertical grouping (row headers) and the vertical axis for measures placed on Rows Region, Product Category, Year
Columns shelf Defines the horizontal grouping (column headers) and the horizontal axis for measures placed on Columns Sales, Profit, Order Date
Marks card Controls how marks are drawn, including shape, color, size, label, and detail Sales, Customer Name

To build a chart, drag a dimension such as Region to the Rows shelf and a measure such as Sales to the Columns shelf. Tableau automatically aggregates the measure as SUM([Sales]) by default. You can change this aggregation using the pill menu or place the field on the Marks card and select Attribute, Sum, or another aggregation.

Multiple fields can be placed on the same shelf. Their order creates a hierarchy and controls how marks are nested—for example, Region followed by Product Category on Rows creates regions containing categories.

Dimensions and Measures

  • Discrete fields create separate headers or categories. Examples include Region, Customer Name and Order Status.

  • Continuous fields create quantitative axes with numeric scales. Examples include Sales, Profit and Discount Rate.

  • Date fields can be used in either form: as a discrete year or month, or as a continuous date axis.

  • A measure can be converted to a dimension when you need distinct values rather than an aggregate calculation.

Calculated fields can also be placed on shelves. For example, a calculated field named Profit defined as [Sales] - [Cost] is normally aggregated when placed on a shelf, commonly as SUM([Profit]).

Business Example

Suppose the source data contains:

Region Sales
North 125,000
South 98,000
East 143,000
West 112,000

Place Region on Rows and Sales on Columns. The expected worksheet is a horizontal bar chart with one bar per region and the sales values on its axis:

Region Sales
East 143,000
North 125,000
West 112,000
South 98,000

Adding Order Date to Color on the Marks card would allow sales to be compared by date within each region without changing the row and column structure.

Filters, LODs and Table Calculations

Shelf placement can affect table-calculation behavior because table calculations operate after aggregation and often use the view’s dimensions for addressing. For example, RUNNING_SUM([Sales]) calculates a running total across the rows or columns currently defined by the shelves.

Filter and LOD evaluation is important:

  • FIXED LOD expressions are evaluated before regular dimension filters.

  • INCLUDE and EXCLUDE LOD expressions are evaluated after dimension filters.

  • Context filters can affect FIXED calculations because they are evaluated earlier.

  • Table-calculation filters are applied after table calculations.

Therefore, adding a filter or rearranging shelf fields may change the context in which a table calculation or LOD expression operates.

Best Practices

  • Start with a clear visual purpose, then choose dimensions and measures deliberately rather than adding fields to every shelf.

  • Use rows and columns for structure; use the Marks card for additional encoding such as color, size or label.

  • Keep hierarchies shallow to reduce clutter. Too many nested dimensions can produce unreadable and slow worksheets.

  • Use discrete date parts such as YEAR or MONTH for category comparisons and continuous dates for trends.

  • Prefer direct aggregations such as SUM([Sales]) when they express the business requirement clearly.

  • Sort using Tableau’s sorting controls where possible instead of creating unnecessary table-calculation fields.

  • For large data sources, use extracts, reduce the number of marks and move highly selective filters to context only when their effect on LOD calculations is understood.

Tableau Prep is used to prepare and shape data, while Tableau Desktop constructs these shelf-based views. Publishing a workbook to Tableau Server or Tableau Cloud preserves the worksheet layout and shelf configuration, allowing authorized users to interact with it according to their permissions.

15

How do you create bar, line, and scatter plots in Tableau?

Marks card is Tableau’s primary control for choosing and configuring chart marks. Place the appropriate dimensions and measures on the Columns and Rows shelves, then use the Marks card to select or refine the mark type, aggregation, labels, colors, and detail.

Read full answer

Applies toTableau Desktop, Tableau Prep, and Tableau Server (current release); Tableau Cloud (current release)

Data Setup and Field Roles

  • Connect and prepare: Use Connect to add an Excel workbook, CSV file, database, or cloud source. Use Tableau Prep to clean, reshape, and combine sources, then connect its output or .hyper extract to Desktop.

  • Live versus extract: Use a live connection for frequently changing operational data. Use an extract for faster performance, controlled refreshes, and predictable dashboard response times.

  • Relationships and joins: Use logical relationships when tables have common keys and compatible grains. Use Data > Join for unmatched-row handling, row-level conditions, many-to-many combinations, or cross-database joins; verify that the join does not create unintended row multiplication.

  • Dimensions and measures: Dimensions provide categories, while measures provide numeric values for aggregation. Dates can be discrete, producing separate headers, or continuous, producing a continuous time axis.

Build the Three Charts

  1. Bar chart

  2. Drag continuous [Revenue] to Columns and discrete [Region] to Rows.

  3. On the Marks card, select Bar or leave Automatic selected.

  4. Swap the shelves for horizontal bars. To display one aggregate bar, remove [Region] and leave [Revenue] on a shelf while retaining the Bar mark type.

  5. Line chart

  6. Drag [Order Date] to Columns and [Revenue] to Rows.

  7. In the date pill’s context menu, select Month or Year of Order Date. For an explicitly calculated month, use DATETRUNC('month', [Order Date]); avoid MONTH([Order Date]) when the year matters.

  8. Select Line on the Marks card. Drag [Region] to Color to create separate regional lines.

  9. Scatter plot

  10. Drag [Advertising Spend] to Columns and [Revenue] to Rows.

  11. Place a unique identifier such as [Order ID] on Detail so each record remains a separate mark.

  12. Drag [Region] to Color and optionally add a trend line from the Analytics pane.

Sample Data and Expected Results

Order ID Order Date Region Revenue Profit Advertising Spend
101 2025-01-31 East 120 35 20
102 2025-01-31 West 95 25 18
103 2025-02-28 East 140 42 22
104 2025-02-28 West 110 30 19
105 2025-03-31 East 155 50 25
106 2025-03-31 West 130 38 21
107 2025-04-30 East 170 58 28
108 2025-04-30 West 125 41 22
  • Bar result: East revenue is 585; West revenue is 460.

  • Line result: Monthly totals are 215, 250, 285, and 295 from January through April.

  • Scatter result: Eight points appear at (20,120), (18,95), (22,140), (19,110), (25,155), (21,130), (28,170), and (22,125), indicating a positive relationship.

Calculated Fields, Filters, and Interactions

  • Calculated fields: Tableau normally aggregates ordinary measures with SUM. Use Data pane > Create > Calculated Field when a metric needs a defined business formula.

  • FIXED LOD: { FIXED [Region] : SUM([Revenue]) } calculates regional revenue before ordinary dimension filters.

  • INCLUDE LOD: { INCLUDE [Region] : SUM([Revenue]) } calculates revenue at the view’s grain plus Region.

  • EXCLUDE LOD: { EXCLUDE [Region] : SUM([Revenue]) } removes Region from the view-level LOD scope when that dimension is in the view.

  • Filter order: Tableau evaluates extract filters, data-source filters, context filters, dimension filters, measure filters, and table-calculation filters in that order. FIXED LODs run before ordinary dimension filters; adding Region to context changes its filtering position.

  • Table calculations: These run after aggregation and may require Compute Using to define the addressing dimension.

  • Parameters and actions: Use an integer parameter such as Top N for configurable metrics or filters. In dashboards, use Dashboard > Actions to configure filter, highlight, URL, or parameter actions across sheets.

Code Example

Create a calculated field named Regional Revenue and enter:

{ FIXED [Region] : SUM([Revenue]) }

Best Practices and Publishing

  • Sort bars by value, label important marks directly, use consistent colors, and avoid unnecessary dual axes.

  • Reduce extract size, remove unused fields, limit high-cardinality detail, and pre-aggregate large fact tables where appropriate.

  • Add reference lines, forecasts, or trend lines only when they support the business question.

  • Use Server > Publish… to publish to Tableau Server or Tableau Cloud, then verify permissions, extracts, refresh schedules, and row-level security. Visualization capabilities are similar, but available features and administrative behavior can differ by platform and release.

16

How do you create a dual-axis chart in Tableau?

A dual-axis chart in Tableau displays two measures against independent vertical scales. It is useful when the measures have different units or magnitudes, such as sales in dollars and profit margin as a percentage.

Read full answer

Applies toTableau Desktop, Tableau Prep, Tableau Server, and Tableau Cloud (current releases)

Core Concepts

  • Dimension: Categorical data, such as Order Date, region, or product category.

  • Measure: Numeric data that can be aggregated, such as SUM([Sales Amount]).

  • Independent axes: The left axis scales one measure, while the right axis scales the other.

  • Combo chart: A common dual-axis design that displays one measure as bars and the other as a line.

Dual axes do not change the underlying data. Both measures use the same view dimensions, relationships, and general filter context.

Step-by-Step in Tableau Desktop

  1. Connect to the data and confirm the table’s grain. For example, each row might represent one order line.

  2. Drag the date or month dimension onto Columns.

  3. Drag the first measure, such as SUM([Sales Amount]), onto Rows.

  4. Drag the second measure, such as [Profit Rate], onto Rows.

  5. In the Marks card, right-click either measure pill and select Dual Axis.

  6. Tableau creates a second vertical axis, normally on the right.

  7. Right-click an axis and select Edit Axis to configure its title, units, range, and tick interval.

  8. To create a combo chart, select the measure for the relevant axis in the Marks card and change its mark type from Automatic to Bar or Line.

For dates, set the date field to Continuous and choose the required granularity, such as Month, when elapsed time should be spaced evenly. Use a Discrete date field when months or other categories should appear separately.

Business Example

Suppose the source contains:

Order Date Sales Amount Profit
2025-01-10 100,000 12,000
2025-02-12 120,000 15,000
2025-03-08 90,000 9,000

Create these fields:

  • Sales Amount: [Sales Amount]

  • Profit Rate: The aggregate calculation shown below

  • Order Month: [Order Date] displayed at month level

Place Order Month on Columns, SUM([Sales Amount]) on Rows, and [Profit Rate] on Rows. Apply Dual Axis, use bars for sales, and a line for profit rate.

Month Sales Amount Profit Rate
January 2025 100,000 12.0%
February 2025 120,000 12.5%
March 2025 90,000 10.0%

The expected chart shows sales bars peaking in February, while the profit-rate line rises from 12% to 12.5% and then falls to 10%.

Code Example

Create the Profit Rate calculated field with this valid Tableau syntax:

IF SUM([Sales Amount]) = 0 THEN NULL
ELSE SUM([Profit]) / SUM([Sales Amount])
END

This calculates the overall profit rate from aggregated profit and sales. Calculating SUM([Profit]) / SUM([Sales Amount]) is preferable to averaging row-level percentages because it gives the correct margin for the displayed data.

Data, Filters, and Performance

  • Joins and relationships: Ensure the join does not duplicate rows and inflate either measure. Many-to-many relationships can duplicate sales and profit values.

  • Tableau Prep: Clean dates, validate data types, and shape the source before building the visualization in Tableau Desktop.

  • Filter order: This aggregate calculation is evaluated after ordinary dimension filters. A FIXED LOD is evaluated before dimension filters unless relevant filters are added to the context. Table calculations run after dimension filtering and aggregation.

  • Live versus extract: Dual axes work with both connection types. Extracts often improve performance by storing an optimized local copy and reducing live-query work; filtered or aggregated extracts can also reduce data volume.

  • Performance: Filter large datasets in the source when possible, avoid unnecessary high-cardinality detail levels, and limit the number of marks rendered.

Best Practices and Publishing

  • Label both axes clearly with their units and add a descriptive title such as “Monthly Sales and Profit Rate.”

  • Independent scales can exaggerate differences. Use a zero baseline for bars and explain any truncated line-axis range.

  • Avoid dual axes when both measures use similar units; a single axis or separate small multiples is usually clearer.

  • Dashboard filter actions normally affect both measures because they belong to the same worksheet. Use separate worksheets or separate target sheets if only one measure should respond.

  • Parameters can switch metrics on an axis, but changing the metric can also change the automatic axis range.

  • Publish the workbook to Tableau Server or Tableau Cloud to preserve the chart, filters, actions, and permissions. Scheduled extract refreshes keep published views current.

17

What is a combined axis chart in Tableau?

A combined axis chart in Tableau (also called a shared-axis or blended-axis chart) displays two or more continuous measures on a single axis with a common scale. It is created by dragging a second measure onto an existing axis or by using Measure Names/Measure Values, allowing direct visual comparison of measures that share the same unit.

Read full answer

Applies toTableau Desktop, Tableau Cloud, and Tableau Server (current release)

How It Works

  • Single axis: All measures share one axis (left or bottom) and the same scale.

  • Same unit required: Measures must use comparable units (e.g., both in dollars, both in percentages) because the axis scale is unified.

  • Mark types: Each measure can have its own mark type (bar, line, shape) while occupying the same axis.

  • Measure Values shelf: When multiple measures are placed on the same axis, Tableau automatically generates the Measure Names and Measure Values fields to manage the combined view.

Creating a Combined Axis Chart

  1. Drag a dimension (e.g., Order Date) to Columns.

  2. Drag the first measure (e.g., Sales) to Rows. Tableau creates a continuous axis.

  3. Drag the second measure (e.g., Profit) directly onto the existing axis (the green pill on Rows) until the axis highlights, then drop. Alternatively, drag the second measure to the Rows shelf next to the first, then click the second pill’s dropdown and choose Add to Axis.

  4. Tableau adds Measure Names to Color (or Detail) and Measure Values to the axis. Adjust mark types per measure via the Measure Values card (click each measure’s dropdown to set Bar, Line, etc.).

  5. Format the axis, add labels, and refine tooltips as needed.

Sample Business Example

Source data:

Order Date Sales Profit
2023-01-01 5000 1200
2023-02-01 4500 900
2023-03-01 6000 1500

After building a combined axis chart with Sales as bars and Profit as a line on the same dollar axis, the view shows both measures over time on a single scale, making it easy to see that profit tracks sales but at a lower magnitude.

Combined Axis vs. Dual Axis

Aspect Combined Axis Dual Axis
Number of axes One shared axis Two independent axes (left/right or top/bottom)
Scale Common scale for all measures Separate scales per measure
Units Must be compatible Can differ (e.g., dollars vs. percentage)
Creation Drag measure onto existing axis Right-click measure → Dual Axis
Typical use Compare measures with same unit Relate measures with different units

Best Practices

  • Use only when units and scales align: Combining dollars with percentages on one axis distorts interpretation.

  • Limit to 2–3 measures: More measures clutter the axis and reduce readability.

  • Differentiate with color and mark type: Assign distinct colors and/or mark types (bar vs. line) to each measure via the Measure Values card.

  • Label the axis clearly: Include the unit (e.g., “Sales & Profit ($)”) so viewers understand the shared scale.

  • Consider a dual axis if magnitudes differ greatly: If one measure is an order of magnitude larger, a combined axis may hide the smaller measure; a dual axis with synchronized scales (if units match) or separate scales (if units differ) can be clearer.

Limitations

  • No independent scaling: Cannot zoom or format each measure’s scale separately.

  • Axis range driven by all measures: Outliers in one measure compress the others.

  • Not suitable for different units: Mixing currency and ratio on one axis is misleading.

18

How do you create a map in Tableau Desktop?

A Tableau map is a worksheet that positions marks using geographic fields or latitude and longitude coordinates. You can build it by assigning geographic roles to location fields, placing the generated coordinates on Rows and Columns, and encoding measures with map marks.

Read full answer

Applies toTableau Desktop, Tableau Prep, Tableau Server, and Tableau Cloud (current release)

Connect and Model the Data

  1. In Tableau Desktop, select Connect > To a File or Connect > a Database.

  2. Add the sales, customer, or operational data required by the worksheet.

  3. Confirm that fields such as Country, State, City, or Postal Code are correctly classified as dimensions.

  4. If Tableau does not recognize a location, right-click it in the Data pane and select Geographical Role, then choose the appropriate role such as Country/Region, State/Province, or City.

  5. If latitude and longitude exist in the source, use them directly. They should be numeric and continuous fields.

For data prepared in Tableau Prep, join fact and location tables using a stable key such as a country code rather than a city name. Check that joins do not duplicate sales records.

Create and Format the Map

  • Drag a location dimension such as City onto Detail.

  • Drag [Longitude (generated)] to Columns and [Latitude (generated)] to Rows.

  • Drag Sales or another measure onto Color and Size.

  • Open the Marks card and use the Map mark type.

  • Add fields to Tooltip and use Label selectively to avoid clutter.

  • Use View > Map Controls or the worksheet controls to provide zoom, pan, and selection options.

For custom coordinates, drag the source longitude to Columns and latitude to Rows. Remember that northern and eastern coordinates are positive, while western and southern coordinates are negative.

Filters, LOD Expressions, and Order of Operations

Filters must be considered when calculating map measures:

  1. Data-source or extract restrictions are applied first.

  2. Context filters are applied next.

  3. Regular dimension filters are applied before aggregation.

  4. LOD expressions are evaluated with important filtering exceptions.

  5. Table calculations run last, over the aggregated results.

A FIXED LOD calculation ignores ordinary dimension filters. For example, filtering City normally does not change a country-level FIXED calculation, but filtering Country as a context filter does. INCLUDE and EXCLUDE calculations depend on the current view level and should be used when a calculation must react to dimensions in the worksheet.

{ FIXED [Country] : SUM([Sales]) }

This returns each country’s total sales regardless of the selected city. Tableau table calculations such as RANK() or WINDOW_AVG() operate after this aggregation, so they generally cannot be used as if they were ordinary row-level calculations.

Publishing Through Prep, Server, and Cloud

  • Tableau Prep: Use Prep Builder to clean and join data and save the flow or a Tableau data source file. To publish a managed output to Tableau Server or Tableau Cloud, run the flow in Tableau Prep Conductor, where the output is published as a data source.

  • Tableau Server: Publish the workbook and either embed an extract or keep the connection live to an enterprise source.

  • Tableau Cloud: Publish through the site, schedule extract refreshes, and control workbook and data-source permissions separately.

  • Tableau Desktop: Open the published source through Server > Add Server or connect to Tableau Cloud from the start page.

Live connections provide current data but depend on source performance. Extracts reduce query load and can be refreshed on a schedule, although they contain a snapshot until refreshed.

Code Example

Use this small sales dataset:

City Country Latitude Value Longitude Value Sales
London United Kingdom 51.5074 -0.1278 80
Paris France 48.8566 2.3522 65
New York United States 40.7128 -74.0060 120

Assign City a geographic role so that Tableau generates the fallback latitude and longitude fields. Create a Latitude (Custom) calculated field:

IF ISNULL([Latitude Value])
THEN [Latitude (generated)]
ELSE [Latitude Value]
END

Create Longitude (Custom):

IF ISNULL([Longitude Value])
THEN [Longitude (generated)]
ELSE [Longitude Value]
END

Place these fields on Rows and Columns, then place SUM(Sales) on Size and Color. The expected result is a world map with three markers: New York is the largest and darkest marker because its sales are 120, while Paris is the smallest and lightest with sales of 65.

Best Practices and Common Pitfalls

  • Use extracts or source-side aggregation for large datasets; avoid unnecessary row-level detail.

  • Remove unused fields and avoid many-to-many joins that inflate sales.

  • Prefer stable geographic identifiers over ambiguous city names.

  • Test geographic-role assignments when markers appear in incorrect locations.

  • Validate coordinate direction, precision, and missing-value handling.

  • Use color and size selectively, add informative tooltips, and provide an accessible non-color indicator such as labels.

  • Check map behavior after publishing, especially extract refreshes, geographic privacy rules, and data-source permissions.

19

How do you create a histogram with bins in Tableau?

A histogram in Tableau is a bar chart that groups a continuous measure into intervals, called bins. Tableau can generate these bins automatically, while a calculated field gives you precise control over business-defined ranges.

Read full answer

Applies toTableau Desktop (current release)

How Tableau Builds a Histogram

A histogram is built from a quantitative field such as Sales:

  1. Drag Sales to Columns or Rows.

  2. Right-click the field in the Data pane and select Create > Bins.

  3. Accept the suggested bin size or enter a custom size, then click OK.

  4. Drag the newly created bin field (e.g., Sales (bin)) to the opposite axis.

  5. Change the mark type to Bar on the Marks card.

  6. Place a dimension such as Order ID on Rows and set its aggregation to COUNT to show the number of orders in each bin.

Tableau automatically creates equal-width bins and replaces the original values with interval labels such as 0–20, 20–40, and 40–60. The height of each bar represents the number of rows or records falling into that interval.

Creating and Editing Bins

For automatic bins:

  1. Right-click the continuous field in the Data pane and select Create > Bins.

  2. Enter a name such as Sales Bin.

  3. Specify a Size of bins for equal-width intervals.

  4. Optionally adjust the Range of values (minimum and maximum) to control the bin boundaries.

  5. Click OK and drag the new bin field into the view.

To modify an existing bin field:

  1. Right-click the bin field in the Data pane.

  2. Select Edit.

  3. Change the bin size or range and confirm.

Automatic bins are useful for exploration, but business definitions often require controlled ranges—for example, separating low-value orders from orders worth at least £50.

Example with Sample Data

Suppose an orders dataset contains:

Order ID Sales
A101 12
A102 18
A103 23
A104 31
A105 42
A106 65

Using intervals 0–19, 20–39, 40–59, 60–79, and 80+ produces:

Sales Bin Expected Result
0–19 2
20–39 2
40–59 1
60–79 1
80+ 0

The histogram therefore has bars with heights 2, 2, 1, 1, and 0.

Filters and Order of Operations

Binning is performed at the row level before measures are aggregated. A calculated bin can therefore group individual transactions, whereas it should not be applied after SUM([Sales]) has already aggregated them.

Tableau evaluates LOD expressions before ordinary dimension filters. A dimension filter affects a FIXED LOD expression only when the filter is added to context. INCLUDE and EXCLUDE expressions follow their applicable dimension filters, while table calculations run after aggregation. Consequently, avoid implementing ordinary bins as table calculations, because table calculations operate on already-aggregated results.

Code Example

For exact business ranges, create a calculated field named Sales Bin:

IF ISNULL([Sales]) THEN "Unknown"
ELSEIF [Sales] < 0 THEN "Negative"
ELSEIF [Sales] < 20 THEN "0-19"
ELSEIF [Sales] < 40 THEN "20-39"
ELSEIF [Sales] < 60 THEN "40-59"
ELSEIF [Sales] < 80 THEN "60-79"
ELSE "80+"
END

Then drag Sales Bin to Columns, set the mark type to Bar, and place COUNT([Order ID]) on Rows.

Best Practices and Common Pitfalls

  • Use raw row-level data: Binning an already aggregated total can produce misleading interval values.

  • Define null and negative handling explicitly: The example separates NULL and negative sales instead of including them in ordinary ranges.

  • Control bin order: Sort bins by their lower boundary rather than alphabetically, because labels such as 80+ may not sort naturally.

  • Label clearly: Use an axis title such as Sales (£) and a tooltip that shows the interval, count, and percentage of total orders.

  • Keep bars adjacent: A histogram represents continuous ranges, so visual gaps can incorrectly suggest missing values.

  • Optimize large datasets: For very large tables, create bins during database preparation or use extracts to reduce refresh and rendering overhead.

  • Publish consistently: Bins are stored as workbook fields and behave the same after publishing to Tableau Server or Tableau Cloud, provided users have access to the underlying data source.

20

How do you create a box plot in Tableau?

A box plot in Tableau summarizes the distribution of a continuous measure using quartiles, a median line, whiskers, and outlier points. Create one by placing a discrete dimension on a shelf, placing an aggregated continuous measure on the other shelf, and changing the mark type to Box-and-Whisker in the Marks card.

Read full answer

Applies toTableau Desktop, Tableau Server, and Tableau Cloud (current releases)

How It Works

A box plot is useful when you need to compare distributions rather than only compare totals.

  • Box: Represents the interval from the first quartile (Q1) to the third quartile (Q3), also called the interquartile range.

  • Median line: Shows the middle value of the distribution.

  • Whiskers: Show the spread beyond the quartiles.

  • Outlier points: Identify observations that fall unusually far from the main distribution.

  • Marks encoding: Tableau can split the data into multiple boxes using dimensions on the Marks card, such as Detail, Color, or Shape.

The measure must be continuous. For example, Sales is continuous, while Region and Product are discrete dimensions.

Create It in Tableau Desktop

  1. Connect to the data through Data > Connect to a File, a database, or a published data source.

  2. Drag a discrete dimension, such as Region, to Columns.

  3. Drag a continuous measure, such as Sales, to Rows. Tableau creates an aggregated field such as SUM(Sales).

  4. Open the Marks card and change the mark-type dropdown from Automatic to Box-and-Whisker.

  5. If you want to further split the data without adding an axis, drag the splitting dimension to Detail on the Marks card.

  6. Add useful labels, tooltips, colors, and reference lines as required.

  7. Use Dashboard > New Dashboard to place the worksheet into a dashboard. Configure dashboard actions through Dashboard > Actions when selecting a box should filter or highlight related views.

For multiple measures, place Measure Values on a shelf and select the required measures. Keep the aggregation explicit—SUM(Sales), AVG(Sales), and MEDIAN(Sales) answer different business questions.

Business Example

Suppose an analyst wants to compare regional sales distributions:

Region Sales
North 100
North 120
North 130
North 140
North 160
South 50
South 60
South 70
South 80
South 90
East 200
East 220
East 240
East 260
East 280

After placing Region on Columns, SUM(Sales) on Rows, and selecting Box-and-Whisker, the expected result is:

Region Median sales Interpretation
North 130 Sales are centered around 130
South 70 Sales are centered around 70
East 240 Sales are centered around 240

Each box should make the within-region spread visible. A narrow box indicates that sales are consistently clustered, while a wide box indicates greater variation.

Best Practices and Common Pitfalls

  • Choose the correct aggregation: Decide whether SUM, AVG, or another aggregation represents the business measure before creating the chart.

  • Limit the number of boxes: Too many categories create a crowded and difficult-to-compare visualization. Filter or group low-value categories.

  • Keep scales consistent: When comparing groups, avoid independent axis ranges unless the comparison requires them.

  • Handle large datasets efficiently: Use an extract, aggregate data, or move transformations upstream in Tableau Prep. Extracts are generally preferable for frequently used, large analytical datasets.

  • Understand filter order: FIXED LOD expressions are evaluated before ordinary dimension filters; INCLUDE and EXCLUDE are evaluated after dimension filters. Table calculations run after filters and measures.

  • Avoid misleading summaries: A box plot does not reveal the exact sample size or all underlying values. Add counts, tooltips, or a supporting detail view when necessary.

  • Publish for consumers: Tableau Prep prepares and tests the data, Tableau Desktop builds the visualization, and Tableau Server or Tableau Cloud publishes the governed workbook for users.

21

How do you create a Pareto chart in Tableau?

A Pareto chart combines descending bars for category values with a cumulative-percentage line. In Tableau, create it by sorting the categories, calculating the running percentage with table calculations, and displaying both measures on a dual axis.

Read full answer

Applies toTableau Desktop (current release); publishing to Tableau Server or Tableau Cloud

How a Pareto Chart Works

  • Bars: Categories sorted from highest to lowest by the selected measure.

  • Cumulative line: The running total divided by the grand total.

  • Common use: Identify the smallest group of products, customers, or regions responsible for most sales or incidents.

The 80/20 principle is useful, but it is not guaranteed: the chart should determine the actual percentage concentration.

Building the Chart in Tableau Desktop

  1. Prepare the data

  2. Use Tableau Prep to clean product names, validate numeric measures, and join sales data.

  3. Keep the category dimension and the measure used for ranking separate.

  4. For large datasets, publish the prepared data to Tableau Server or Tableau Cloud through a published datasource or extract.

  5. Create the cumulative percentage

  6. Open the data pane and select Analysis > Create Calculated Field.

  7. Name the field Cumulative Sales %.

  8. Enter the formula shown in the Code Example below.

  9. Drag the new calculated field to the view, then right-click its pill on the Rows shelf (or Marks card) and choose Compute Using > Product (or the dimension used for categories).

  10. Add the fields

  11. Drag Product to Columns.

  12. Drag SUM(Sales) to Rows.

  13. Drag Cumulative Sales % to Rows.

  14. Right-click Cumulative Sales % and select Dual Axis.

  15. In the Marks card, set SUM(Sales) to Bar and Cumulative Sales % to Line.

  16. Format the percentage axis with a fixed range from 0% to 100%.

The descending sort on Product is essential because Tableau table calculations follow the displayed order.

Sample Data and Expected Result

Rank Product Sales Cumulative Sales Cumulative %
1 A 500 500 50%
2 B 300 800 80%
3 C 150 950 95%
4 D 50 1,000 100%

The line should pass through 50%, 80%, 95%, and 100%. Products A and B together generate 80% of total sales.

Filters, LOD Expressions, and Calculation Order

Tableau’s relevant evaluation order is:

  • Extract and data-source filters are applied first.

  • FIXED LOD expressions are evaluated next.

  • Ordinary dimension filters are applied after FIXED calculations.

  • INCLUDE and EXCLUDE LOD expressions are evaluated afterward.

  • Table calculations, including the Pareto calculation, run last.

This means an ordinary product filter reduces the rows available to both RUNNING_SUM and WINDOW_SUM. If a FIXED total must ignore a dimension filter, add the relevant dimension to the filter context:

{ FIXED : SUM([Sales]) }

However, using a fixed denominator with filtered categories can produce a cumulative line that does not finish at 100%. For a normal Pareto chart, use WINDOW_SUM and apply category and date filters before the table calculation. When using a table-calculation filter such as Top N, verify the Compute Using and filter order because it can change the running total.

Code Example

Create this Tableau calculated field for Cumulative Sales %:

RUNNING_SUM(SUM([Sales]))
/
WINDOW_SUM(SUM([Sales]))
  • RUNNING_SUM(SUM([Sales])) calculates cumulative sales in the displayed descending order.

  • WINDOW_SUM(SUM([Sales])) calculates the total sales for the current table-calc window.

  • The result is displayed as a percentage by formatting the axis as a percentage.

Performance and Publishing Best Practices

  • Optimize the data: Aggregate to the required category level in Tableau Prep when row-level detail is unnecessary.

  • Reduce data early: Apply date, region, and product filters in the data source when practical.

  • Use extracts selectively: An extract often improves Tableau Desktop and Server performance, while a live connection is preferable when frequent source changes matter more than speed.

  • Avoid unnecessary rows: Large row-level datasets make table calculations slower and make visual clutter more likely.

  • Design clearly: Label the axis as “Cumulative % of Sales,” show category labels, and use a contrasting line for the cumulative measure.

  • Publish responsibly: Publish the workbook from Tableau Desktop to Tableau Server or Tableau Cloud, then configure datasource credentials, permissions, and refresh schedules according to the organization’s governance model.

22

How do row-level and aggregate calculations differ in Tableau?

A row-level calculation is evaluated for each record in the source data before Tableau aggregates it. An aggregate calculation uses functions such as SUM(), AVG(), or COUNTD() and is evaluated at the level of the current view, such as a region subtotal or grand total.

Read full answer

Applies toTableau Desktop (current release); Tableau Cloud and Tableau Server (current release)

How Tableau Evaluates Them

  • Row-level calculation: A calculated field containing no aggregate function. It operates on individual source records and can then be aggregated in the view.

  • Aggregate calculation: A calculated field containing at least one aggregate function. Tableau evaluates it using the marks and dimensions currently in the view.

  • Aggregation level: An aggregate calculation may produce different results for a detail mark, subtotal, and grand total.

  • Table calculation: This is a separate category. Table calculations operate on data that has already been aggregated by Tableau, unlike row-level and aggregate calculations.

Whether a calculation is row-level or aggregate can be checked by selecting the field in a worksheet and inspecting its aggregation indicator.

Sample Data and Expected Result

Assume an Orders table contains:

Order ID Region Product Sales Cost
1001 East A 120 80
1002 East B 200 130
1003 West A 300 210

Create the row-level calculated field:

[Profit] = [Sales] - [Cost]

Its value is calculated separately for every order:

Order ID Region Profit
1001 East 40
1002 East 70
1003 West 90

When Region is on Rows and the view uses SUM([Profit]), the result is:

Region Sum of Sales Sum of Profit
East 320 110
West 300 90
Grand Total 620 200

An aggregate calculated field such as:

[Profit Margin] = (SUM([Sales]) - SUM([Cost])) / SUM([Sales])

produces:

Region Profit Margin
East 34.4%
West 30.0%
Grand Total 32.3%

Creating the Calculated Fields

  1. Open the data pane and select Analysis > Create Calculated Field.

  2. Enter [Profit] = [Sales] - [Cost].

  3. Select OK, then drag Region onto Rows and Profit onto Columns or Text.

  4. Select Profit and choose the appropriate aggregation, such as Sum.

  5. For the aggregate calculation, enter [Profit Margin] = (SUM([Sales]) - SUM([Cost])) / SUM([Sales]).

Use SUM() for additive measures such as revenue, cost, and quantity. Avoid SUM() for non-additive measures such as customer IDs, percentages, or balances; COUNTD(), AVG(), or a domain-specific formula may be more appropriate.

Order of Operations

When filters, LOD expressions, or table calculations are involved, Tableau evaluates the view in this order:

  1. Extract filters

  2. Data source filters

  3. Context filters

  4. Dimension filters

  5. FIXED LOD expressions

  6. INCLUDE and EXCLUDE LOD expressions

  7. Table calculations

Consequently, a FIXED LOD expression is affected by context filters but normally ignores ordinary dimension filters. An aggregate calculation is then calculated using the rows remaining at its level in the worksheet. Table calculations run last and therefore see the aggregated result.

Best Practices and Common Pitfalls

  • Keep row-level logic reusable: Define [Profit] once at the row level and aggregate it wherever the measure is used.

  • Choose the correct aggregation: Tableau may automatically aggregate continuous numeric fields, but business requirements should determine whether SUM, AVG, MIN, MAX, or COUNTD is correct.

  • Do not confuse aggregation with table calculation: A percentage-of-total calculation can use an LOD expression or a table calculation, but each has different filtering behaviour.

  • Avoid excessive LOD expressions: Multiple complex LOD calculations can increase processing time and make dependency behaviour harder to maintain.

  • Design clear visuals: Use subtotals and grand totals deliberately, format percentages consistently, and label whether values are totals, averages, or distinct counts.

  • Model data before calculating: Relationships, join types, and correct measure granularity determine whether a row-level calculation produces meaningful results.

23

How do LOD expressions control aggregation granularity in Tableau?

LOD expressions are Tableau calculated fields that explicitly control the level of detail at which an aggregate is calculated. They are useful for repeating totals, calculating percentages against fixed denominators, and comparing detailed rows with broader aggregates while respecting Tableau’s calculation order.

Read full answer

Applies toTableau Desktop, Tableau Server, and Tableau Cloud (current stable releases)

How LOD Expressions Work

An LOD expression uses one of three keywords:

  • FIXED: Calculates an aggregate at a specified dimensional level, independently of ordinary dimensions in the view.

  • INCLUDE: Adds dimensions to the view’s level of detail.

  • EXCLUDE: Removes dimensions from the view’s level of detail.

The general syntax is:

{ FIXED dimension : aggregate }
{ INCLUDE dimension : aggregate }
{ EXCLUDE dimension : aggregate }

For example, this expression calculates sales for each customer independently of the dimensions displayed in the worksheet:

{ FIXED [Customer] : SUM([Sales]) }

LOD expressions are calculated before ordinary dimension filters and table calculations.

FIXED, INCLUDE, and EXCLUDE

Given this sample data:

Region Customer Sales
East Alice 100
East Bob 120
West Alice 80
West Carol 200
LOD type Calculated field Result
FIXED { FIXED [Customer] : SUM([Sales]) } Alice: 180; Bob: 120; Carol: 200
INCLUDE { INCLUDE [Customer] : SUM([Sales]) } Adds customer detail to the view’s aggregation level
EXCLUDE { EXCLUDE [Customer] : SUM([Sales]) } Calculates the total without customer, repeated across customer rows

If both Region and Customer are in Rows:

  • The FIXED result repeats Alice’s customer total of 180 in both the East and West rows.

  • The EXCLUDE result shows the regional totals: 220 for East and 280 for West, repeated for each customer in that region.

Order of Operations

Tableau evaluates calculations in this order, including blending-related filters when applicable:

  1. Extract filters

  2. Data-source filters

  3. Data-blending filters

  4. Context filters

  5. FIXED LOD expressions

  6. INCLUDE LOD expressions

  7. EXCLUDE LOD expressions

  8. Dimension filters

  9. Table calculations

This means a standard dimension filter normally does not change a FIXED result. If the filter must constrain the fixed calculation, add the dimension to Filters, right-click it, and select Add to Context. Context filters are evaluated before FIXED LOD expressions.

Table Calculations Versus LOD Expressions

  • LOD expressions calculate an aggregate at a defined data-level granularity.

  • Table calculations operate on aggregated values already visible in the worksheet.

For example, the following table calculation calculates each row’s percentage of the visible grand total:

SUM([Sales]) / TOTAL(SUM([Sales]))

It can use a regional denominator instead if the table calculation is partitioned by Region, such as by selecting Compute Using > Region.

By contrast, this LOD expression calculates the percentage against each customer’s fixed total:

SUM([Sales]) / { FIXED [Customer] : SUM([Sales]) }

The LOD denominator remains based on the fixed customer calculation, while the table-calculation denominator depends on its addressing and the rows visible after filters and aggregation.

Code Example

Create a calculated field named Customer Fixed Sales in Tableau with:

{ FIXED [Customer] : SUM([Sales]) }

Then create Customer Sales Percentage:

SUM([Sales]) / { FIXED [Customer] : SUM([Sales]) }

For Alice, the expected results are:

Region Customer Sales Customer Fixed Sales Percentage
East Alice 100 180 55.56%
West Alice 80 180 44.44%

Best Practices and Common Pitfalls

  • Use meaningful dimensions: Choose the lowest-dimensional grain that defines the calculation, such as customer or product category.

  • Avoid unnecessary LOD expressions: A normal aggregate or table calculation may be sufficient when the denominator should follow the current view.

  • Check filter order: Dimension filters normally occur after LOD calculations, while context filters occur before FIXED calculations.

  • Limit complexity: Many nested or high-granularity LOD expressions can increase query time, especially against large live data sources.

  • Use extracts where appropriate: Extracts can improve performance for frequently used dashboards, although they should be refreshed when source data changes.

  • Keep the data model clear: Use relationships or joins to create a dimensional model with consistent customer, product, and date fields before building LOD calculations.

  • Label the calculation: Use a descriptive name such as Customer Lifetime Sales rather than an ambiguous name such as LOD 1.

24

How do FIXED, INCLUDE and EXCLUDE differ in Tableau LOD expressions?

FIXED, INCLUDE and EXCLUDE are Tableau Level of Detail (LOD) expressions that control the dimensional scope of an aggregated calculation. FIXED establishes an independent aggregation level, INCLUDE adds dimensions to the calculation, and EXCLUDE removes dimensions from the view’s dimensionality.

Read full answer

Applies toTableau Desktop (current release)

Core Difference

Expression Dimensional scope Typical use
FIXED Uses only the dimensions specified inside the expression Stable KPIs, regional totals, target denominators
INCLUDE Uses the view’s dimensions plus the included dimensions Detail that expands beyond the current view
EXCLUDE Uses the view’s dimensions except the excluded dimensions View-dependent subtotals and percentage-of-total calculations

The important distinction is that FIXED does not depend on the dimensions currently displayed, while INCLUDE and EXCLUDE depend on the view’s dimensional context.

How Each Expression Works

  • FIXED [Region]: Calculates the measure for every Region, regardless of whether Region appears in the view. The result can repeat across multiple rows.

  • INCLUDE [Region], [Product]: Adds Region and Product to the dimensions used by the calculation. It can provide more detail than the current view.

  • EXCLUDE [Product]: Removes Product from the view’s dimensions for this calculation. It does not remove product records from the data or filter the data source.

For example, with the following source data:

Region Product Sales
East A 100
East B 200
West A 300
West B 400

Create these Tableau calculated fields (shown as inline code): - { FIXED [Region] : SUM([Sales]) } - { INCLUDE [Region], [Product] : SUM([Sales]) } - { EXCLUDE [Product] : SUM([Sales]) }

With Region and Product in the view, the expected result is:

Region Product Sales FIXED Region INCLUDE Region, Product EXCLUDE Product
East A 100 300 100 300
East B 200 300 200 300
West A 300 700 300 700
West B 400 700 400 700

FIXED [Region] repeats the regional total on every product row. INCLUDE [Region], [Product] retains the product-level aggregation, while EXCLUDE [Product] returns the regional total.

If the view contains only Product, EXCLUDE [Product] has no remaining view dimensions, so it calculates the overall total rather than a regional subtotal.

Filters and Order of Operations

Tableau evaluates calculations in this relevant order:

  1. Extract filters

  2. Data source filters

  3. Context filters

  4. FIXED LOD expressions

  5. Dimension filters

  6. INCLUDE/EXCLUDE LOD expressions

  7. Measure filters

  8. Table calculations

Consequently, ordinary dimension filters are applied after FIXED LOD expressions but before INCLUDE/EXCLUDE LOD expressions. Therefore, dimension filters do not affect FIXED results unless they are added to Context Filters. However, dimension filters do affect INCLUDE and EXCLUDE results because they are evaluated after dimension filters. To make a dimension filter affect a FIXED calculation, add the relevant dimension to the view’s Context Filters. Data source filters and context filters are applied earlier and therefore influence all LOD results.

Table calculations run after dimension filters and measure filters, so they often produce different results from equivalent LOD expressions when filters are involved.

When to Use Each

  • Use FIXED for KPI values that should remain stable when users drill into other dimensions, such as regional revenue shown beside product sales.

  • Use INCLUDE when the calculation should add detail that is not represented in the current view, such as calculating at customer and product level while displaying only region.

  • Use EXCLUDE for subtotals that depend on the current view, such as showing product sales and their regional contribution while retaining product rows.

Best Practices and Pitfalls

  • Keep dimensions inside LOD expressions: Use fields such as Region or Category rather than measures such as Sales.

  • Aggregate explicitly: Write SUM([Sales]) inside the LOD expression rather than relying on implicit aggregation.

  • Avoid high-cardinality fixed dimensions: A FIXED [Customer] or FIXED [Order ID] calculation can create expensive aggregations on large datasets.

  • Use context filters deliberately: Context filters change the rows available to FIXED calculations and can alter results unexpectedly.

  • Choose FIXED for stable business KPIs: INCLUDE and EXCLUDE are more appropriate when the desired result must change with the current view.

  • Validate with filters and drill-downs: Check that totals remain correct after filtering, changing the view dimensions and using dashboard actions.

25

When should you use FIXED LOD instead of table calculations in Tableau?

Use a FIXED level-of-detail (LOD) expression when the calculation represents a reusable aggregation that should be independent of the marks currently in the view. Use a table calculation when the result must depend on the view’s dimensions, table direction, partitions, or visible rows.

Read full answer

Applies toTableau Desktop, Tableau Cloud, and Tableau Server (current release)

Key Difference

A FIXED LOD expression calculates at the level specified inside the expression:

{ FIXED [Region] : SUM([Sales]) }

  • [Region] determines the calculation’s granularity.

  • SUM([Sales]) determines the measure being aggregated.

  • The calculated result is available to the view before table calculations run.

  • Normal dimension filters do not affect the FIXED calculation unless the relevant dimensions are added as context filters.

A table calculation runs after aggregation and operates on the marks in the current view. Examples include RANK, WINDOW_SUM, moving averages, running totals, and differences from the previous row.

When to Use FIXED LOD

Use FIXED when you need:

  • A stable benchmark: Compare each order with its regional or customer-level average regardless of the table’s partition.

  • Reusable aggregations: Apply the same regional total or average across multiple sheets.

  • Calculations independent of table direction: Avoid results changing when a user moves a dimension between rows and columns.

  • A fixed aggregation granularity: Calculate at an explicit level such as customer, region, or product category.

  • Values that can feed other calculations: A FIXED result can participate in filters, percentages, reference lines, or further calculations.

FIXED LOD is particularly useful for percentages such as:

SUM([Sales]) / { FIXED [Region] : SUM([Sales]) }

This expresses each sale as a percentage of the corresponding regional total.

When to Use a Table Calculation

Use a table calculation when the business question is explicitly about the current view:

  • Rank customers within the displayed region.

  • Calculate a running total by order date.

  • Calculate a moving average over the last three periods.

  • Compare sales with the immediately preceding row.

  • Calculate a total across only the visible marks or current partition.

For example, a regional running total ordered by date can use:

RUNNING_SUM(SUM([Sales]))

In the table-calculation addressing controls, choose Table Calculation > Compute Using > Specific Dimensions, partition by [Region], and order by [Order Date]. The calculation is appropriate here because the result follows the table’s partition and order.

Business Example

Sample order data:

Region Order Sales
East E-101 100
East E-102 150
West W-201 200

Create [Regional Sales]:

{ FIXED [Region] : SUM([Sales]) }

Create [Sales % of Region]:

SUM([Sales]) / { FIXED [Region] : SUM([Sales]) }

Expected result:

Region Order Sales Regional Sales Sales % of Region
East E-101 100 250 40%
East E-102 150 250 60%
West W-201 200 200 100%

A table calculation can produce the same values in this unfiltered detail view, but it can behave differently when dimensions, filters, table direction, or partitions change.

Filters and Order of Operations

Tableau applies the main calculation stages in this order:

  1. Extract filters

  2. Data source filters

  3. Context filters

  4. FIXED LOD expressions

  5. INCLUDE LOD expressions

  6. EXCLUDE LOD expressions

  7. Dimension filters

  8. Measure filters

  9. Table calculations

Consequently, a FIXED calculation for [Region] and [Year] still includes all years when [Year] is an ordinary dimension filter. If the regional total should use only the selected year, add [Year] as a context filter or include it inside the LOD expression:

{ FIXED [Region], [Year] : SUM([Sales]) }

Table calculations see the filtered result after earlier filtering stages.

Best Practices and Pitfalls

  • Measure performance: FIXED expressions can be expensive when their dimensions have high cardinality. Table calculations can also be expensive when processing dense partitions, so neither is automatically faster.

  • Use context filters carefully: A context filter can reduce the data processed by a FIXED expression, but it also changes which rows are available to subsequent calculations.

  • Keep business grain explicit: State whether the required result is per customer, per region, per year, or per displayed mark.

  • Prefer FIXED for true business aggregates: Choose table calculations for view-dependent analytics rather than using them to reproduce a stable regional or customer benchmark.

  • Format measures clearly: Format percentages as percentages and choose sensible decimal precision to keep dashboards readable.

  • Test partition changes: Always verify table calculations after changing filters, dimensions, sort order, or table direction.

  • Plan data before Tableau: Tableau Prep does not evaluate FIXED LOD expressions. Prepare and aggregate source data in Prep when appropriate, then publish it to Tableau Cloud or Tableau Server for FIXED, INCLUDE, EXCLUDE, and table calculations.

26

What are the main filter types in Tableau?

In Tableau, filters restrict the data available to worksheets, dashboards, extracts, or data sources. The principal types are data source, extract, dimension, measure, and context filters; include/exclude selections and LOD-based filters are specific patterns built using those capabilities.

Read full answer

Applies toTableau Desktop, Tableau Prep, Tableau Server, and Tableau Cloud (current release)

Main Filter Types

Filter type Scope and behavior Typical use
Data source filter Applies at data-source scope and affects all worksheets using that source. It can constrain live source queries and the rows included in an extract. Restricting orders to a relevant year before analysis.
Extract filter Applies only when Tableau creates or refreshes an extract. It has no effect when the same workbook uses a live connection. Reducing extract size or excluding irrelevant records from an extract.
Dimension filter Filters rows using values from a dimension. It can select members, define ranges, or use operators such as Region = East. Showing only selected products, regions, or dates.
Measure filter Filters aggregated results using a measure, often with a condition such as SUM([Sales]) >= 10000. Retaining products above a sales threshold.
Context filter A worksheet filter evaluated early, before ordinary dimension filters and LOD expressions. Fields must be explicitly added to the context. Ensuring selected records are available when a FIXED LOD expression is evaluated.

An include/exclude filter is a selection mode within a standard filter, not a separate calculation type. An LOD filter is a Boolean calculated field based on an LOD expression, such as { FIXED [Customer ID] : SUM([Sales]) } >= 90.

Dimensions may be discrete, representing exact members, or continuous, representing ranges or bins. Tableau conventionally displays discrete fields in blue and continuous fields in green. A Quick Filter is a dashboard control that exposes a filter; it is not another filtering engine.

Order of Operations

Tableau’s logical filter and calculation order is:

  1. Extract filters, when an extract is in use.

  2. Data source filters.

  3. Context filters.

  4. FIXED LOD expressions.

  5. INCLUDE and EXCLUDE LOD expressions.

  6. Ordinary dimension filters.

  7. Measure filters.

  8. Table calculations and filters based on table calculations.

Consequently, an ordinary dimension filter does not change the rows used by a FIXED expression. Promoting the relevant field to context makes that filter part of the data available when the LOD expression is calculated.

Practical Example

Use this sample data:

Customer ID Region Product Sales
C1 East Widget 100
C2 East Gadget 50
C3 West Widget 80
C4 West Gadget 40

The calculated field { FIXED [Customer ID] : SUM([Sales]) } returns each customer’s total. Filtering with [Customer Total] >= 90 therefore retains only C1, with Sales = 100.

To demonstrate a context filter, use { FIXED [Region] : SUM([Sales]) }:

  • With ordinary filters Region = East and Product = Gadget, the fixed regional total remains 150, because ordinary dimension filters run after FIXED.

  • Promote Product = Gadget to context and leave Region = East as an ordinary dimension filter. The context filter runs before FIXED, so the regional total becomes 50.

Desktop, Prep, and Publishing

  • In Tableau Desktop, right-click a field and choose Add to Filters. Use Add to Context when evaluation order matters. A Boolean calculated field can be placed on the Filters shelf and filtered to True.

  • In Tableau Prep, use the Filters pane to include or exclude rows at a step, often a Clean step, before publishing the prepared output.

  • In Tableau Server and Tableau Cloud, published workbooks preserve their filter definitions. For live connections, only eligible filters may be pushed to the source; measure filters, LOD calculations, and table calculations are not assumed to run in the database.

  • Parameters, sets, and dashboard filter actions can apply filtering, but they are not additional core filter scopes. Parameter controls can drive filters or calculations, while filter actions restrict their target worksheets or sheets.

Best Practices and Pitfalls

  • Use restrictive data source filters to reduce source data early, and extract filters when the objective is to control extract contents or size.

  • Add context filters only when their earlier evaluation changes the required result; they increase complexity and can affect performance.

  • Use FIXED expressions carefully when their partitions are large, because they may require processing many rows.

  • Keep visible filter controls focused and clearly labelled, including an All option where appropriate.

  • Validate totals and filter order in views that combine context filters, LOD expressions, or table calculations.

  • Treat visible filters as analytical controls, not a security boundary. Use supported Tableau Server or Tableau Cloud row-level security data permissions for restricted access.

27

How does Tableau order filtering and calculation evaluation?

Tableau evaluates filters and calculations according to a fixed order of operations. The sequence determines which records feed LOD expressions and which aggregated results are available to table calculations.

Read full answer

Applies toTableau Desktop, Tableau Prep, Tableau Server, and Tableau Cloud (all currently supported versions)

Order of Operations

For a published or locally rendered view, Tableau evaluates components in this order:

  1. Extract filters: Records are filtered when the extract is created.

  2. Data source filters: Records are filtered before the view processes the underlying data.

  3. Context filters: Context filters evaluate before LOD expressions, so they affect FIXED, INCLUDE, and EXCLUDE results.

  4. FIXED LOD expressions: FIXED calculations establish a fixed level of detail.

  5. INCLUDE LOD expressions: INCLUDE calculations extend the level of detail with specified dimensions.

  6. EXCLUDE LOD expressions: EXCLUDE calculations remove specified dimensions from the level of detail.

  7. Dimension filters: Ordinary filters on dimensions run after LOD expressions.

  8. Measure filters: Filters based on aggregated measures run after the relevant aggregation.

  9. Table calculations: Table calculations process the final aggregated result set.

Tableau also resolves dependencies between calculated fields rather than treating every aggregate calculation as a separate stage. For example, an aggregate calculation used by a table calculation must be computed before that table calculation.

Applying the Order

  • Create a calculated field with Analysis > Create Calculated Field.

  • Add a filter by dragging a field to the Filters shelf.

  • Move a filter into context by right-clicking it on the Filters shelf and selecting Add to Context.

  • Choose the addressing behavior of a table calculation with Table Calculation > Compute Using, or from the field’s context menu.

  • Valid LOD syntax includes { FIXED [Region] : SUM([Sales]) }, { INCLUDE [Product] : SUM([Sales]) }, and { EXCLUDE [Region] : SUM([Sales]) }.

A normal dimension filter does not change the denominator of a FIXED expression. To make that filter affect the LOD result, place it in context or remove the records upstream through an extract filter, data source filter, or database view.

Business Example

Assume the following sales data:

Region Product Sales
East Widget 100
East Gadget 200
West Widget 300
West Gadget 400

Create the calculated field SUM([Sales]) / { FIXED [Region] : SUM([Sales]) }.

Apply ordinary filters for Region = East and Product = Widget:

Region Product Numerator FIXED Denominator Result
East Widget 100 300 33.33%

The ordinary filters run after the FIXED expression, so the denominator still includes all East-region products: 100 + 200 = 300.

Now move Product = Widget into context while leaving Region = East as an ordinary filter. The context filter runs before the FIXED expression:

Region Product Numerator FIXED Denominator Result
East Widget 100 100 100.00%

Format the calculated field as a Percentage and label it clearly, such as “Share of Region Sales.”

Best Practices and Platform Notes

  • Use context filters selectively: They control LOD evaluation but can increase query complexity and reduce performance.

  • Reduce LOD cardinality: Avoid fixing on high-cardinality fields such as transaction IDs unless the business requirement demands it.

  • Keep table calculations explicit: Set Compute Using deliberately, especially with grand totals, partitions, and nested calculations.

  • Filter upstream when appropriate: Tableau Prep, extracts, or database views can reduce data before Tableau evaluates LOD expressions.

  • Protect performance: Use extracts for suitable large datasets, index database columns used by filters and joins, and remove unused fields.

  • Design for clarity: Show active filter states, distinguish context filters visually, and label percentages with their denominator.

  • Tableau Prep prepares and cleans data but does not reproduce the worksheet-level LOD or table-calculation pipeline. Tableau Server and Cloud render published workbook calculations using the same semantic order as Tableau Desktop.

28

What is a context filter in Tableau?

A context filter is a filter that Tableau evaluates before most worksheet calculations, including FIXED LOD expressions. Use it when a selected dimension must influence the data scope used by a calculation, rather than simply removing rows after the calculation has already been evaluated.

Read full answer

Applies toTableau Desktop, Tableau Cloud, and Tableau Server (current releases)

How It Works

Tableau normally evaluates a dimension filter after FIXED, INCLUDE, and EXCLUDE LOD expressions. A context filter moves that filter earlier in the evaluation order:

  • The filtered rows are excluded before LOD expressions are calculated.

  • FIXED calculations use only the context-filtered data.

  • Subsequent dimension filters still apply normally.

  • Table calculations run after dimension filters and measure filters.

A context filter does not change the level of detail of a calculation. It changes which records are available when that calculation is evaluated.

For example, consider this sales data:

Region Category Sales
East Furniture 100
East Office Supplies 50
West Furniture 200
West Office Supplies 80

Create the calculated field { FIXED [Region] : SUM([Sales]) }. The field returns the total sales for each region across all categories before any ordinary dimension filter is applied.

Using a Context Filter

To make the Category = Furniture filter affect the LOD calculation:

  1. Drag Category to the Filters shelf.

  2. Select Furniture from the filter dialog.

  3. Right-click the Category filter pill.

  4. Select Add to Context.

  5. To reverse the change, right-click the pill and select Remove from Context.

In a separate worksheet, compare the normal filter with the context filter:

Filter behavior East regional total West regional total
Normal dimension filter 150 280
Context filter 100 200

With a normal dimension filter, Tableau calculates the regional totals using all categories and then removes the non-Furniture rows. With a context filter, Tableau removes those rows first, so the FIXED calculation sees only Furniture sales.

Order of Operations

Tableau’s relevant calculation order is:

  1. Extract filters

  2. Data source filters

  3. Context filters

  4. FIXED LOD expressions

  5. INCLUDE LOD expressions

  6. EXCLUDE LOD expressions

  7. Dimension filters

  8. Measure filters

  9. Table calculations

This order explains why a context filter changes FIXED results but is not always needed for a table calculation. Ordinary dimension filters already occur before table calculations.

If multiple context filters are used, their evaluation order can affect results. Configure them deliberately and verify the outcome rather than assuming they behave like an unordered list of filters.

When to Use One

Use a context filter when:

  • A FIXED, INCLUDE, or EXCLUDE calculation must use only the selected category, region, date period, or other dimension.

  • A filter must define the population used by an LOD-based denominator or comparison.

  • A worksheet contains calculations whose results depend on a filter being applied before calculation.

Do not use one merely to hide unwanted rows. A normal dimension filter is usually simpler, more flexible, and easier for viewers to understand when no calculation needs to see the filtered data early.

Best Practices and Pitfalls

  • Keep context filters intentional: They can make results different from those produced by ordinary filters, which can confuse report users.

  • Check the calculation order: If a FIXED result does not change after adding the filter to context, verify whether the field is actually part of the calculation’s level of detail.

  • Watch performance: Context filters can reduce the data processed by expensive calculations, but they can also add processing complexity. Test performance with representative data and extracts.

  • Prefer filters over modeling workarounds: Fix incorrect joins, relationships, or source-grain issues in the data model rather than relying on context filters to hide them.

  • Document the behavior: Include the filter’s purpose in the dashboard or worksheet description, especially when it changes LOD denominators.

29

How do Tableau parameters control calculations and dashboards?

A Tableau parameter is a workbook-level input that lets users change a calculation, filter, set, or dashboard behavior without editing the underlying data. Unlike a worksheet filter, a parameter does not filter rows by itself; it supplies a value that other Tableau operations can use.

Read full answer

Applies toTableau Desktop (current release), Tableau Cloud (current release), and Tableau Server (current release)

What a Tableau parameter does

Parameters provide reusable values for interactive analysis. They can be used to:

  • Control a calculated field, such as a sales target or date range.

  • Provide an input to a filter expression.

  • Switch between measures, categories, or calculation variants.

  • Define a threshold for a KPI or exception report.

  • Drive a dashboard control that allows users to explore different scenarios.

A parameter is stored in the workbook rather than in the data source. Changing its value changes the workbook’s results, but it does not modify the original data or create a new data extract.

Creating and using a parameter

To create a parameter in Tableau Desktop:

  1. Open the Data pane and select the Parameters section.

  2. Select Create Parameter.

  3. Configure properties such as:

  4. Name: Sales Threshold

  5. Data type: Integer

  6. Current value: 100

  7. Allowable values: Range

  8. Minimum: 0

  9. Maximum: 1000

  10. Step size: 10

  11. Select OK.

  12. Right-click Sales Threshold and select Show Parameter to display its control.

To reference the parameter in a calculation, create a calculated field through Analysis > Create Calculated Field and enter the parameter name in square brackets. The parameter can then be used like any other field in Tableau calculations.

On a dashboard, add the parameter control through Dashboard > Objects > Parameter, then select the parameter name. Users can change the value interactively when viewing the dashboard.

Business example

Suppose the following sales data is available:

Region Sales
North 120
East 80
South 150
West 100

Create an integer parameter named Sales Threshold with a current value of 100. Then create this calculated field:

IF [Sales] >= [Sales Threshold] THEN
    "Target Met"
ELSE
    "Below Target"
END

With the parameter set to 100, the expected result is:

Region Sales Result
North 120 Target Met
East 80 Below Target
South 150 Target Met
West 100 Target Met

If the user changes the parameter to 125, North and West become Below Target, while South remains Target Met.

Code Example

A parameter can also drive a Boolean filter. Create a calculated field such as:

[Sales Threshold Filter] = [Sales] >= [Sales Threshold]

Add Sales Threshold Filter to the Filters shelf and select True. The worksheet will show only rows whose sales meet or exceed the selected threshold.

CASE [Sales Threshold Filter]
WHEN TRUE THEN [Sales]
END

The second calculation is useful when displaying the qualifying sales values while retaining the original field for labels or context.

Order of operations

Parameters do not have an independent filter stage. The operation using the parameter determines when it is evaluated:

  • A parameter used in a FIXED LOD expression is evaluated at the FIXED LOD stage, before ordinary dimension filters.

  • A parameter used in a dimension or measure filter follows that filter’s position in Tableau’s order of operations.

  • A parameter used in a table calculation is evaluated when the table calculation runs, after the relevant dimensions and measures have been aggregated.

  • A parameter calculation does not become a context filter automatically. Add the relevant filter to Context explicitly when a stable context is required.

For example, changing a threshold parameter can alter a FIXED LOD result because the parameter value is part of the LOD expression. However, context filters still affect the rows available to the FIXED calculation.

Best practices and common pitfalls

  • Use parameters for scenario inputs: They are effective for targets, minimum thresholds, selected years, and user-controlled comparison values.

  • Do not expect a parameter to filter automatically: Put the parameter inside a calculated field or filter expression when filtering is required.

  • Prefer clear names: Sales Threshold is more understandable than Parameter 1.

  • Keep parameter types consistent: Match the parameter type to the field it compares with, especially for dates and numbers.

  • Avoid unnecessary complexity: A parameter does not improve extract size or automatically improve performance.

  • Test changing the value: Verify behavior at low, current, and high values, particularly when table calculations or LOD expressions are involved.

  • Plan for published workbooks: Parameters remain available in Tableau Cloud and Tableau Server, but administrators may restrict workbook or site permissions.

  • Remember the tool boundary: Tableau Prep is used for data preparation and does not provide the interactive workbook parameter controls available in Tableau Desktop, Cloud, and Server.

30

What are parameter actions in Tableau?

Parameter actions pass a value from a selected, hovered, or menu-activated mark into a Tableau parameter. Calculations and filters that reference that parameter then update, allowing one dashboard interaction to control several visuals indirectly.

Read full answer

Applies toTableau Desktop, Tableau Server, and Tableau Cloud (current release)

Core Behavior

A parameter action connects a source sheet to a workbook parameter. When the interaction occurs, Tableau writes a compatible value from the source field into the parameter.

Parameter actions can run on:

  • Select: The parameter changes when a mark is selected.

  • Hover: The parameter changes as the pointer moves over eligible marks.

  • Menu: The parameter changes when a user chooses the action from a mark’s tooltip menu.

Unlike a filter action, a parameter action does not directly filter, highlight, or select marks in another sheet. Instead, other sheets update because their calculations reference the parameter.

Configuration Steps

  1. Create the parameter

  2. In the Data pane, select Parameters > Create Parameter.

  3. For example, create a String parameter named Selected Category.

  4. Set its default value to All and allow Furniture, Office Supplies, and Technology.

  5. Create the controlling calculation

  6. Create a Boolean calculated field named Category Filter with the following formula:
    IF [Selected Category] = "All" THEN TRUE ELSE [Category] = [Selected Category] END

  7. Add the calculation to the Filters shelf and select only True.

  8. Configure the action

  9. Open the dashboard and select Dashboard > Actions.

  10. Click Add Action and choose Change Parameter Values.

  11. Choose the dashboard sheet containing the source marks.

  12. Set Run action on to Select.

  13. Choose Selected Category as the Target parameter.

  14. Choose Category as the Source field.

  15. Click OK.

The parameter’s data type must be compatible with the source field. For example, a String parameter cannot receive a numeric Sales value.

Parameter Actions vs Filter Actions

Feature Parameter action Filter action
Writes a value to a parameter Yes No
Directly filters target sheets No Yes
Controls multiple visuals through calculations Yes No
Supports Select, Hover, and Menu triggers Yes Select, Hover, Menu, or URL-related options
Requires dependent calculations Usually No
Best for Dynamic thresholds, selected categories, scenarios Conventional cross-filtering and highlighting

For example, a parameter action can change a selected product’s comparison metric or customer segment. A filter action is usually simpler when the requirement is only to filter or highlight another sheet.

Evaluation Order

The action updates the parameter before Tableau recalculates the affected view. The dependent calculation is then evaluated, and its filter is applied according to Tableau’s normal order:

  1. Extract filters

  2. Data source filters

  3. Context filters

  4. Dimension filters

  5. Measure filters

  6. FIXED LOD expressions

  7. INCLUDE LOD expressions

  8. EXCLUDE LOD expressions

  9. Table calculations

A regular dimension filter based on a parameter does not automatically become a context filter. Consequently, a FIXED LOD expression may still calculate using all underlying rows. Use a context filter or include the intended dimension in the FIXED expression when parameter-driven selection must affect the LOD result.

Example with Sample Data

Use the following sample data:

Category Sales
Furniture 1,200
Office Supplies 900
Technology 1,500

Expected results:

User action Parameter value Visible rows Visible Sales
No category selected All All three rows 3,600
Select Technology Technology Technology only 1,500
Select Office Supplies Office Supplies Office Supplies only 900

Expose Selected Category as a dashboard parameter control if users also need a way to return the dashboard to All.

Best Practices

  • Keep the calculation simple: A parameter action works best when its effect is immediately visible. Avoid long chains of dependent calculations.

  • Use meaningful labels: Explain what selecting a mark changes, especially when the action runs on hover.

  • Limit hover actions: Hover actions can repeatedly trigger recalculation and may distract users.

  • Test all dashboard states: Check cleared selections, parameter resets, and interactions between multiple actions.

  • Optimize large datasets: Use extracts for large sources, pre-aggregate where possible, and minimize expensive calculations triggered on every interaction.

  • Avoid ambiguous feedback: Add titles or dashboard text showing the current parameter value so users understand why the visuals changed.

  • Publishing: Publish the workbook to Tableau Server or Tableau Cloud like other dashboards; parameter actions are stored in the workbook and work without Server-side calculations.

31

How do groups and hierarchies differ in Tableau?

Groups combine selected members of a dimension into a reusable business category, while hierarchies organize related dimensions into nested levels for navigation and drill-down. Both help users explore data at different levels of detail.

Read full answer

Applies toTableau Desktop, Tableau Server, and Tableau Cloud (current releases); Tableau Prep (current release, groups only)

Groups vs. Hierarchies

Feature Group Hierarchy
Purpose Combines dimension members into one category Arranges dimensions in parent-child order
Data model Creates a new grouped dimension Keeps the original dimensions but relates them logically
Example California, Washington → Pacific Country → State → City
Navigation Switches between grouped and original categories Enables drill-down and roll-up
Aggregation Groups facts by the new category Shows nested headers or aggregated results at each level

A group does not change the underlying records or automatically aggregate measures. For example, grouping states into Pacific classifies each fact under that group when the grouped field is placed in the view.

Creating Groups and Hierarchies

To create a group:

  1. Add the source dimension to a worksheet.

  2. In the Data pane, right-click the dimension and select Group.

  3. Select the dimension members to include.

  4. Enter a meaningful group name and select OK.

  5. Replace or supplement the original field with the new group in Rows, Columns, Filters, or Marks.

You can also select values in a view and use the context menu’s Group command. The original dimension remains available so users can switch between detailed and grouped analysis.

To create a hierarchy:

  1. In the Data pane, drag one dimension onto another to create a hierarchy.

  2. Drag additional dimensions into that hierarchy.

  3. Arrange the fields in the required top-to-bottom order in the Data pane.

  4. Place the hierarchy on Rows or Columns.

  5. Use the expand and collapse controls to drill through its levels.

Tableau Desktop can also create date and geographic hierarchies automatically. A hierarchy is not a data relationship or join and does not multiply rows.

Business Example

Consider this sales data:

Country Region State City Sales
USA West California Los Angeles 120
USA West Washington Seattle 100
USA East New York New York 80
Canada East Ontario Toronto 60

A group could combine California and Washington into Pacific. Using the grouped field with SUM([Sales]), the aggregated result is:

Sales Group Sales
Pacific 220

California and Washington are components of Pacific, not additional rows in this aggregate. If the view is configured to show detail within the group, it may also display California at 120 and Washington at 100 beneath the group; these levels must not be summed as independent facts.

A hierarchy could contain Country → Region → State → City. Its expanded leaf-level result is:

Country Region State City Sales
USA West California Los Angeles 120
USA West Washington Seattle 100
USA East New York New York 80
Canada East Ontario Toronto 60

Filters and LOD Expressions

A group behaves like any other dimension when filtering or calculating. For example, this LOD expression calculates sales fixed by country and sales group:

{ FIXED [Country], [Sales Group] : SUM([Sales]) }

Tableau evaluates FIXED LOD expressions before ordinary dimension filters. Consequently, an ordinary dimension filter does not restrict the rows considered by a FIXED expression. If the filter must affect the LOD result, add it to the Context filter list because context filters are evaluated before FIXED.

Groups can also be used in calculated fields and table calculations. When combining them with LOD expressions or table calculations, verify the calculation order rather than assuming the displayed filter order is the processing order.

Best Practices and Publishing

  • Use groups for business categories that analysts need to compare, such as Pacific, Enterprise, or High Value.

  • Use hierarchies for genuine containment relationships, such as Country → State → City.

  • Choose clear, stable names because group names appear in filters, tooltips, legends, and published dashboards.

  • Keep hierarchies to useful levels; excessive nesting can create crowded headers and increase rendering work.

  • Prefer dimensions for grouping large fact tables and avoid duplicating measures merely to simulate a hierarchy.

  • In Tableau Prep, grouped values can be created as cleaned output fields before connecting the output to Tableau Desktop.

  • Groups and hierarchies created in Tableau Desktop are stored in the workbook and published with it to Tableau Server or Tableau Cloud. Consumers can use them without rebuilding the structure, although source changes can affect their available members.

32

How do quick filters differ from action filters in Tableau?

A quick filter is a visible dashboard control that lets users choose filter values, while an action filter applies a filter when users interact with a dashboard element, such as selecting a mark. Quick filters are explicit and persistent; action filters are interaction-driven and contextual.

Read full answer

Applies toTableau Desktop, Tableau Cloud and Tableau Server (current releases)

Core Differences

Aspect Quick Filter Action Filter
How it is triggered User changes the value in a filter card User selects or otherwise activates a source mark
Configuration Created from a field or worksheet filter Created through a dashboard or sheet action
Filter source Field values exposed by the quick filter Values represented by the selected source mark
Scope Can apply to one worksheet, selected worksheets, or worksheets using a data source Applies to designated target worksheets
Typical use case Region, date range, product category Drill from customer to orders, or click a map to filter a dashboard
Visibility The filter card is visible on the dashboard The action is usually invisible until a mark is selected
Clearing behavior Users manually reset the quick filter Can be configured to show all values when the selection is cleared

A quick filter generally exposes values for one or more fields. An action filter can map selected fields from the source sheet to target fields or use the special All Fields option.

How to Configure Them

Create a quick filter:

  1. Drag the dimension onto the Filters shelf of a worksheet.

  2. Right-click the filter on the Filters shelf (or the field’s dropdown arrow on the dashboard worksheet) and choose Show Filter, which adds the quick filter card to the dashboard.

  3. Right-click the quick filter card and select Apply to Worksheets.

  4. Choose the required scope, such as Selected worksheets, Only this worksheet, or All using this data source.

  5. Use Edit Filter… (and Customize Filter… for the card layout) to configure the available values, wildcard search and filter conditions; use Add to Context when the filter must be treated as a context filter.

Create an action filter:

  1. Open the dashboard and select Dashboard > Actions… > Add Action > Filter.

  2. Choose the source worksheet and configure Run action on as select, menu, or hover.

  3. Select the target worksheets.

  4. Map source fields to target fields, or choose All Fields.

  5. Configure clearing behaviour (Show all values, Leave the filter, Exclude all values) and whether multiple selections should be included.

A highlight action is related but different: it changes emphasis and formatting rather than removing nonmatching records from target worksheets.

Business Example

Suppose the Orders data contains:

Region Customer Sales
East Acme 120
West Acme 80
East Beta 60
  • A quick filter on Region, set to East, returns two records with total sales of 180.

  • An action filter triggered by selecting Acme in a customer worksheet returns two records with total sales of 200.

  • The action can target an orders worksheet and map the selected Customer field to the target worksheet’s Customer field.

Filters and Calculation Order

Both mechanisms filter records before row-level calculations and table calculations are evaluated. A FIXED LOD expression may still be evaluated before ordinary dimension filters unless the relevant filters are added to context.

  • Make dimension filters contextual when the result of a FIXED LOD must respect the filter.

  • Remember that table calculations operate over the rows remaining after filtering.

  • Action filters are event-driven, so their target scope and field mapping determine which worksheets they affect.

Best Practices

  • Use quick filters for common dashboard controls that users need to understand immediately.

  • Use action filters for exploratory drill-down and cross-filtering between worksheets.

  • Clearly label action sources so users know what can be selected.

  • Avoid excessive action targets, which can create confusing interactions.

  • Keep the same dimension and consistent values when mapping action fields.

  • Prefer compact filter controls and relevant default selections to keep dashboards uncluttered.

33

What are filter, highlight, and URL actions in Tableau?

Dashboard actions create interactive behavior between worksheets. A filter action changes which records appear in target sheets, a highlight action emphasizes matching values without removing other values, and a URL action opens an external or Tableau URL when a user interacts with a source sheet.

Read full answer

Applies toTableau Desktop, Tableau Cloud, and Tableau Server (current release)

How Dashboard Actions Work

Each action has four main parts:

  • Source sheets: Worksheets containing the values users select.

  • Trigger: Usually Select, Hover, or Menu.

  • Target sheets: Worksheets affected by the action.

  • Fields: Dimensions or measures used to match source selections with target values.

Actions are created through Dashboard > Actions > Add Action. They are stored in the Tableau workbook and remain available when the workbook is published to Tableau Cloud or Tableau Server. Tableau Prep can prepare and combine the underlying data, but it does not configure dashboard actions.

Filter Action

A filter action filters target worksheets using the values selected in a source worksheet.

  1. Create a source sheet, such as Sales by Region.

  2. Open the dashboard and select Dashboard > Actions > Add Action.

  3. Choose Filter and select the source sheet.

  4. Choose Select, Hover, or Menu under Run Action On.

  5. Select the target sheets.

  6. Choose either:

  7. Selected Fields: Only the source fields you tick determine which target values remain.

  8. All Fields: Tableau passes matching values for every field whose name matches between source and target — this is the usual cause of “my filter removed rows I did not expect”.

  9. Click OK.

When the selection is cleared, the target normally returns to showing all values.

For example, if a user selects East in Sales by Region, a target sheet containing product details can show only East records.

Highlight Action

A highlight action emphasizes marks with matching values and dims nonmatching marks. It does not remove records or change totals.

To configure it:

  1. Choose Dashboard > Actions > Add Action > Highlight.

  2. Select the source and target sheets.

  3. Select the field whose values should control the highlighting (Selected Fields or All Fields).

  4. Choose the interaction trigger.

This is useful for comparisons where users need context. For example, selecting West can highlight West marks across regional, product and KPI sheets while retaining East and South marks as dimmed context.

URL Action

A URL action opens a web address when the user selects or hovers over a configured source sheet.

  1. Choose Dashboard > Actions > Add Action > URL.

  2. Under Run Action On, choose Select, Hover, or Menu.

  3. In Target URL, type the address and use the Insert dropdown to add field values as angle-bracket tokens: https://example.com/orders?region=<Region>

  4. Attach the action to the worksheet(s) whose mark selections should open the link.

When East is selected, the URL becomes:

https://example.com/orders?region=East

Use approved domains and avoid constructing URLs from unvalidated user input.

Business Example and Calculation Order

Assume the sales data is:

Region Category Sales
East Furniture 12,000
East Office 8,000
West Furniture 15,000
West Office 9,000
South Furniture 10,000
South Office 7,000

The dashboard contains Sales by Region as the source and Sales by Category as the target.

  • Filter action: Selecting East shows 12,000 in Furniture and 8,000 in Office, for a total of 20,000.

  • Highlight action: Selecting West highlights the West bars while dimming East and South; the dashboard totals remain unchanged.

  • URL action: Selecting East opens https://example.com/orders?region=East.

Tableau’s calculation order for these actions:

  • Context filters (including an action filter added to context) → FIXED LOD expressions → INCLUDE/EXCLUDE LOD expressions → dimension filters and normal filter actions → table calculations.

  • A table calculation such as RUNNING_SUM(SUM(Sales)) responds to the filtered rows entering the calculation.

  • A FIXED LOD calculation such as { FIXED : SUM(Sales) } generally does not respond to an action filter unless that filter is added to the context.

  • Highlight actions affect visual emphasis only; they do not change aggregation or calculation results.

  • Changing a parameter requires the separate Change Parameter action type.

Best Practices and Pitfalls

  • Limit target sheets: Each target may require additional data processing. Avoid applying actions to every worksheet by default.

  • Prefer Select over Hover: Hover actions can trigger frequent queries and make dashboards feel unstable.

  • Align source and target dimensions: Filters and highlights depend on matching dimension values, so inconsistent labels, hierarchies or joins can produce unexpected results.

  • Optimize extracts: Action filtering does not make an inefficient extract fast. Reduce unnecessary dimensions and rows before publishing.

  • Make interaction discoverable: Use tooltips, text instructions, clear labels and visible selections so users understand what is clickable.

  • Test published behavior: Verify actions in Tableau Cloud or Server because browser and device interactions can differ slightly from Tableau Desktop.

34

What makes a Tableau dashboard effective for analysis?

An effective Tableau dashboard is a decision-focused visual interface that helps users monitor KPIs, investigate exceptions, and take action without overwhelming them. It combines a clear visual hierarchy, purposeful visuals, efficient data modelling, and carefully designed interactions.

Read full answer

Applies toTableau Desktop, Tableau Prep, Tableau Server, and Tableau Cloud (current releases)

Core Design Principles

  • Audience and decision: Define the questions the dashboard should answer, such as “Are sales on track?” or “Which region requires attention?”

  • Visual hierarchy: Place the most important KPI or trend where users can identify it quickly, supported by consistent spacing, sizing, and alignment.

  • Focused visuals: Give each chart one analytical purpose and avoid displaying every available measure.

  • Consistent encoding: Use the same colour for the same concept, consistent number formats, clear labels, and meaningful titles.

  • Interactivity: Use filters, dashboard actions, highlights, and parameter controls to reveal detail while keeping the initial view uncluttered.

  • Actionability: Include thresholds, owners, reference periods, or contextual notes so users know what to do after identifying an issue.

  • Accessibility: Avoid relying on colour alone, use readable labels, and maintain sufficient contrast and font sizes.

Data and Workbook Design

  1. Connect and model the data

  2. In Tableau Desktop, use Data > Connect to Data to connect the source.

  3. Use Tableau Prep when cleaning, reshaping, deduplicating, or combining data is required.

  4. Prefer logical relationships when they represent the model correctly; use joins where relationship semantics are insufficient or a deliberate row-level join is required.

  5. Use a live connection for frequently changing operational data when near-real-time access is important. Use an extract for faster repeated analysis, large historical datasets, or controlled refreshes.

  6. Define dimensions and measures clearly

  7. Use dimensions for categories such as Region, Customer, and Order Month.

  8. Use measures for quantities such as Revenue, Target, and Variance.

  9. Treat discrete fields as categories and continuous fields as values suitable for trends, ranges, and aggregation.

  10. Use an aggregate calculated field such as SUM([Revenue]) - SUM([Target]) for variance. For attainment, use IF SUM([Target]) = 0 THEN NULL ELSE SUM([Revenue]) / SUM([Target]) END to avoid division by zero.

  11. Create purposeful worksheets

  12. Use lines for trends, bars for comparisons, and maps only when geographic context adds analytical value.

  13. Aggregate data before using table calculations when possible.

  14. Give charts descriptive titles, such as “Monthly Revenue Compared with Target,” rather than generic labels.

  15. Assemble and test the dashboard

  16. Select Dashboard > New Dashboard, then add worksheets, text objects, containers, and layout objects.

  17. Add relevant fields as filters and use Dashboard > Actions to configure filter, highlight, URL, or parameter actions.

  18. Test the user journey with different filters, selections, parameter values, and screen sizes.

Business Example

Suppose a sales manager needs one dashboard showing performance against target:

Month Region Revenue Target
Jan North 120,000 100,000
Jan South 90,000 80,000
Feb North 130,000 110,000
Feb South 95,000 85,000
Mar North 140,000 120,000
Mar South 100,000 90,000
Mar East 120,000 110,000
Mar West 80,000 80,000

Missing region-month combinations are absent records, not zero values.

A practical dashboard could contain:

  • KPI cards: Total Revenue, Target, Variance, and Attainment.

  • Line chart: Monthly revenue and target.

  • Bar chart: Revenue by region, sorted by variance.

  • Filters: Date range and region.

  • Parameter control: Target attainment threshold.

  • Dashboard action: Selecting a region filters the other worksheets.

The expected unfiltered result is:

KPI Expected result
Total Revenue 875,000
Total Target 775,000
Variance 100,000
Attainment 112.9%
Status On track

Performance and Publishing

  • Reduce unnecessary detail: Remove unused fields, limit marks where appropriate, and avoid exposing irrelevant records.

  • Optimize extracts: Schedule refreshes according to data volatility and use incremental extracts when the source and refresh pattern support them.

  • Apply calculations efficiently: Aggregate before table calculations and avoid unnecessary row-level FIXED LOD expressions.

  • Understand evaluation order: Context filters run before FIXED LOD expressions. Ordinary dimension filters run after FIXED but before INCLUDE and EXCLUDE LOD expressions. Table calculations run after dimensions are filtered.

  • Publish appropriately: Tableau Server is self-hosted, while Tableau Cloud is hosted by Tableau. Publish workbooks to the appropriate environment, configure permissions, and validate row-level security before sharing.

  • Use Prep pipelines where needed: Publish governed Prep outputs to Tableau Server or Tableau Cloud when cleansing and transformation must be repeated or audited.

Best Practices and Common Pitfalls

  • Design for a defined user action rather than merely displaying available data.

  • Validate calculations against a trusted control total.

  • Avoid excessive colours, decorative effects, duplicated charts, and unclear metric names.

  • Keep important filters visible and provide a clear reset or default state.

  • Use tooltips for supporting detail instead of crowding the dashboard.

  • Use FIXED, INCLUDE, and EXCLUDE LOD expressions only when the calculation requires them.

  • Document metric definitions, refresh schedules, owners, and known data limitations.

35

What are containers in Tableau dashboards?

Containers are layout regions in Tableau dashboards that group worksheets, text objects, other dashboards, or nested containers. They help organize dashboard content and control how tiled objects resize when the dashboard or container dimensions change.

Read full answer

Applies toTableau Desktop, Tableau Server, and Tableau Cloud (current releases)

How Containers Work

A container acts like a dashboard zone with its own position, size, and layout behavior:

  • Tiled objects are arranged and resized according to the container’s rules.

  • Horizontal containers arrange tiled children from left to right, placing them side by side.

  • Vertical containers arrange tiled children from top to bottom, stacking them vertically.

  • Nested containers allow complex layouts, such as placing a chart and KPI row inside one section of a dashboard.

  • Floating objects retain their independent positioning rather than being automatically reflowed as tiled children.

Containers affect presentation only. They do not change how measures are aggregated, how calculated fields or LOD expressions are evaluated, or how filters and dashboard actions operate.

Adding and Configuring a Container

  1. Create the required worksheets and open the dashboard.

  2. Select Dashboard > Add > Container.

  3. Choose Horizontal Container or Vertical Container.

  4. Drag worksheets or other dashboard objects into the container.

  5. Resize the container by dragging its edges. Tiled children respond to the available space.

  6. Use Dashboard > Format to configure the container’s position, size, padding, borders, and layout behavior.

For example, use a horizontal container when several KPI worksheets should appear side by side. Use a vertical container when charts or text sections should be stacked vertically.

Business Example

Suppose the dashboard must display regional sales, profit, and profitability:

Region Sales Profit
East 120,000 24,000
West 95,000 19,000
Central 140,000 21,000
Total 355,000 64,000

Create three worksheets:

  • Total Sales: SUM(Sales)

  • Total Profit: SUM(Profit)

  • Profit Margin: SUM(Profit) / SUM(Sales)

Place the three KPI worksheets in a horizontal container so they appear across the dashboard, and place the regional sales chart in another tiled section.

The expected result is:

  • Total Sales: $355,000

  • Total Profit: $64,000

  • Profit Margin: 18.0%

  • Regional chart: East $120,000, West $95,000, Central $140,000

The container provides consistent spacing and resizing without changing the values calculated by the worksheets.

Filters, Actions, and Interactivity

Containers do not create a new filter scope. Worksheet, data source, and dashboard filters continue to apply according to their existing scope, while dashboard actions still trigger between worksheets in the same way.

A common pattern is:

  1. Place a regional sales chart and a product-detail chart in separate container sections.

  2. Select the sales chart.

  3. Use Dashboard > Actions to filter the detail chart when a mark is selected.

  4. Add a dashboard filter for year or region without changing the container structure.

Avoid using containers as a substitute for a data model. Dimensions and measures should still be defined appropriately in Tableau Data Extract or the original data source.

Best Practices

  • Use containers for meaningful dashboard sections, not for every individual object.

  • Keep related visuals together and leave consistent spacing between sections.

  • Prefer tiled worksheets for responsive dashboards; use floating objects only when precise placement is essential.

  • Limit the number of simultaneously rendered, computationally heavy worksheets.

  • Use filters or extracts to reduce unnecessary data and improve load time in Tableau Server and Tableau Cloud.

  • Test dashboards at different screen sizes and devices. Container resizing is helpful, but poorly designed fixed-size worksheets may still produce scrolling or clipping.

  • Verify published dashboards in Tableau Server or Tableau Cloud because device dimensions, user permissions, and data-source performance can affect the displayed dashboard, even though the container structure is retained.

36

How do you create responsive Tableau dashboards for desktop, tablet, and phone?

Responsive Tableau dashboards adapt to the available space by combining automatic sizing, containers, and separate device layouts. Containers resize tiled objects, while phone and tablet layouts provide genuinely different arrangements when shrinking the desktop view would make it unusable.

Read full answer

Applies toTableau Desktop, Tableau Server, and Tableau Cloud (current releases)

Configure the Dashboard Size

  1. Open the workbook in Tableau Desktop.

  2. Select Dashboard > Format.

  3. In the dashboard formatting pane, set Size to Automatic.

With Automatic sizing, the dashboard fills the available application or browser window and resizes when that window changes. Use Fixed size when the output must retain exact dimensions, such as a controlled PDF export. Range specifies minimum and maximum dimensions but is generally less convenient when the dashboard must support several screen sizes.

Build a Container-Based Layout

Containers let worksheets, text objects, and images resize together instead of remaining at fixed pixel positions.

  1. Open the dashboard’s Layout pane.

  2. Use its menu to select Add Container.

  3. Choose a Horizontal Container for elements arranged side by side or a Vertical Container for stacked elements.

  4. Drag worksheets and other supported objects into the container.

  5. Keep objects tiled inside the container unless deliberate overlap requires floating placement.

A container resizes its tiled children proportionally; it does not automatically wrap objects onto another row or turn a horizontal arrangement into a vertical one. For example, a map and regional table can share a horizontal container on desktop and become smaller side by side. If they must be stacked on a phone, place them in a separate phone device layout.

Configure Device Layouts

Use the Device Preview control in Tableau Desktop’s dashboard toolbar to test desktop, tablet, and phone dimensions. For substantially different content, select Dashboard > Device Layouts and create dedicated tablet and phone layouts.

  • Keep the most important KPI at the top.

  • Replace dense charts with focused, ranked views.

  • Remove secondary legends, annotations, and controls that are not essential.

  • Use readable fonts and touch-friendly spacing.

  • Include only the worksheets and standard dashboard objects required by each experience.

Ensure that an action’s source and target worksheets remain available in the relevant layout. Add parameter controls and filter cards only where required; do not rely on dashboard extensions for Tableau Mobile because they are not supported there. Publishing to Tableau Server or Tableau Cloud retains the device layouts for supported mobile use.

Business Example

Assume the following source data:

Region Sales Orders
North 120,000 310
South 95,000 245
West 87,000 220
East 76,000 198

Create a calculated field named Total Sales using the formula in the next section. The expected total is 378,000, and North is the highest-selling region at 120,000.

A responsive design could present the results as follows:

Device Layout and Result
Desktop KPI cards, sales map, regional table, and detailed trend chart
Tablet KPI cards above a regional bar chart, retaining the map when space permits
Phone Total Sales of 378,000 and a ranked regional chart led by North

The objective is not identical content on every device. Each layout should communicate the relevant business question without horizontal scrolling, clipped controls, or unreadable text.

Code Example

In Tableau Desktop, select Analysis > Create Calculated Field, name the field Total Sales, and enter:

SUM([Sales])

This returns the sum of the numeric Sales field for each aggregation context.

Best Practices and Common Pitfalls

  • Test at real dimensions: Device Preview is useful, but also test the published dashboard on actual phones and tablets.

  • Prioritize information: Mobile layouts should emphasize one or two business questions rather than reproducing the entire desktop dashboard.

  • Design for touch: Avoid hover-dependent interactions and leave adequate spacing around filters and buttons.

  • Use clear hierarchy: Keep KPI values prominent, minimize decoration, and use consistent label and color meanings.

  • Control the number of marks: Limit large tables, high-cardinality dimensions, and excessive marks to improve rendering performance.

  • Use extracts where appropriate: Scheduled extracts can reduce load time and dependence on an operational source system.

  • Avoid unnecessary floating objects: Fixed positions can overlap or leave large empty areas as the dashboard resizes.

  • Validate filters and actions: Confirm that selected values remain understandable and that action sources and targets exist in each device layout.

37

How does a Tableau Story present an interactive analysis?

A Tableau Story is a narrative presentation that organizes dashboards, worksheets, and saved dashboard states into a guided sequence. It lets viewers move through an analysis step by step, with filters, selections, highlights, and parameters preserved or changed at each step.

Read full answer

Applies toTableau Desktop, Tableau Cloud, and Tableau Server (current release)

How It Works

A Story contains one or more story points arranged on a story canvas. Each story point can display a dashboard or worksheet and control the state of that content.

Story points can define:

  • Sheet visibility: Show or hide a worksheet within the dashboard.

  • Filter values: Apply specific filter selections, such as Region = North.

  • Highlights: Emphasize selected marks, categories, or members.

  • Parameters: Present a parameter with a particular value.

  • Selections: Capture selections made in the source dashboard.

When viewers open the Story, they can navigate with the available navigation controls. The story therefore acts like a presentation layer over a Tableau workbook rather than a separate calculation environment.

Story Points vs. Dashboards

Feature Dashboard Story
Purpose Explore several related views interactively Explain a process or conclusion sequentially
Layout Flexible dashboard canvas Ordered story canvas
Filtering Users change filters interactively Authors can preset filters per story point
Navigation Dashboard controls and actions Previous, next, or navigation buttons
Best suited for Self-service exploration Guided analysis and executive presentations

A Story does not replace the underlying worksheets or calculations. It uses existing Tableau content and defines how that content appears during the narrative.

Business Example

Suppose an analyst creates a dashboard named Regional Sales Performance from the following data:

Month Region Revenue
January North $120,000
January South $95,000
February North $145,000
February South $110,000
March North $150,000
March South $130,000

The dashboard contains a map, a monthly revenue chart, and a Revenue KPI.

The Story could be structured as follows:

  1. Overall performance: Show the dashboard with no story-point filters. The total revenue displayed is $750,000.

  2. North region: Apply Region = North to the relevant worksheets. North’s total revenue becomes $415,000.

  3. March results: Apply both Region = North and Month = March. The displayed revenue is $150,000.

  4. Conclusion: Show the KPI and monthly trend to summarize the result.

Viewers see a controlled progression from the overall business to a specific region and period while retaining the underlying dashboard’s interactivity.

How to Build a Story

  1. Create and validate the worksheets or dashboard that will be used.

  2. In Tableau Desktop, select the Story tab and create a new story.

  3. Drag a worksheet or dashboard from the Sheets pane onto the story canvas.

  4. To add another state of the same dashboard, select the story point and choose Story > New Story Point.

  5. Use the story-point configuration panel to select target sheets and set filter values, highlights, parameter values, or sheet visibility.

  6. Arrange the points in narrative order and configure navigation and captions.

  7. Save the story as part of the workbook.

  8. Publish the workbook to Tableau Server or Tableau Cloud and grant users permission to view it.

Filter values captured or edited for a story point are applied to the affected sheets through Tableau’s normal filtering pipeline; the relevant stage depends on the filter’s type and scope. The standard evaluation order is extract filters, data-source filters, context filters, FIXED LOD expressions, INCLUDE LOD expressions, EXCLUDE LOD expressions, dimension filters, measure filters, and table calculations. Thus, a non-context dimension filter is evaluated after FIXED, INCLUDE, and EXCLUDE expressions; a measure filter is evaluated later, and table calculations run last. A context filter remains before FIXED expressions.

Best Practices and Limitations

  • Design for one conclusion per step: Give each story point a clear message rather than placing every worksheet in the workbook.

  • Use descriptive titles: Titles such as “Revenue reached $150,000 in March” are clearer than generic labels such as “Story Point 3.”

  • Limit filters per story point: Preset only the filters needed to support the intended narrative.

  • Target filters carefully: When Tableau offers choices such as All Using This Data Source or Selected Sheets, scope them to prevent unintended changes.

  • Check all story points: Test filter combinations, parameter behavior, hidden sheets, and navigation on both Desktop and the browser.

  • Avoid duplicating dashboards unnecessarily: Use separate story points when the same dashboard with different filter states is sufficient.

  • Remember the purpose: Stories are effective for guided communication, while dashboards are generally better for open-ended exploration.

38

How should null values be handled in Tableau?

Null handling in Tableau means deciding whether missing values should remain missing, be excluded, or be replaced with a valid business value. The correct approach depends on the field’s business meaning and on how nulls affect aggregation, filters, LOD expressions, joins, and published workbooks.

Read full answer

Applies toTableau Desktop 2025.1, Tableau Prep 2025.1, Tableau Server 2025.1, and Tableau Cloud (current release)

Handling Strategy

Treat nulls according to their business meaning rather than replacing them automatically:

  • Measure: Usually leave the value null so SUM, AVG, COUNT, and other aggregations ignore it.

  • Dimension: Exclude null members when appropriate, or replace them with a meaningful display label.

  • Missingness indicator: Create a calculated field that distinguishes missing values from valid values such as zero.

  • Source cleanup: Clean or validate null keys and values in Tableau Prep, the database, or another upstream system when they indicate broken data.

A null is not the same as a numeric zero. Replacing a missing sale with zero can materially change averages, percentages, and targets.

Calculated Fields and Business Example

In Tableau Desktop, select Analysis > Create Calculated Field or right-click a field in the data pane and select Create > Calculated Field.

Sample data:

Order ID Customer Sales Profit
1 Alice 100 20
2 NULL 50 NULL
3 Bob NULL 5
4 Alice NULL NULL

Useful calculated fields include:

  • [Sales Clean] = IFNULL([Sales], 0) for totals where missing sales should count as zero.

  • [Sales Status] = IF ISNULL([Sales]) THEN "Missing" ELSE "Present" END for monitoring completeness.

  • [Customer Display] = IF ISNULL([Customer]) THEN "Unknown customer" ELSE [Customer] END for clearer labels.

Expected results:

Metric Original fields Sales Clean
Total sales 150 150
Average sales 75.00 37.50
COUNT([Sales]) 2 4
Missing-sales rows 2 0

The average changes because the original AVG([Sales]) ignores the missing value, while AVG([Sales Clean]) includes a zero in the denominator. This is why blanket replacement is often inappropriate.

A separate "Null" dimension member is not necessarily the same as an actual null value. Inspect the underlying data and test filters against both when the distinction matters.

Filters and Evaluation Order

To exclude null dimension members:

  1. Drag the dimension onto the Filters shelf.

  2. Right-click the field and select Filter.

  3. Open the Condition tab.

  4. Under Null Values, select Non-null values.

Tableau evaluates the main operations in this order:

  1. Extract filters

  2. Data source filters

  3. Context filters

  4. Dimension filters

  5. Measure filters

  6. FIXED LOD expressions

  7. INCLUDE LOD expressions

  8. EXCLUDE LOD expressions

  9. Table calculations

Consequently, regular dimension filters do not affect FIXED calculations; use context filters when a FIXED calculation must respect that restriction. Table calculations run after aggregation and may see a different set of null results from the underlying measure.

For customer-level totals, this calculation treats missing sales as zero:

// Tableau calculated field: Customer Sales including missing sales as zero
{ FIXED [Customer] : SUM(IFNULL([Sales], 0)) }

The null customer is grouped into its own FIXED partition. Use INCLUDE when the aggregation should respond to additional dimensions in the view; use EXCLUDE to remove selected dimensions from the level of detail.

Tableau Prep, Server, and Cloud

In Tableau Prep, use the Profile pane to identify nulls, select the null values, right-click, and select Replace Nulls. Choose a constant or another field as the replacement.

Before joining, decide explicitly whether null keys should remain unmatched or use a controlled sentinel value. Replacing them with a shared placeholder can make otherwise unmatched null keys match placeholder rows, so replacement must follow the business matching rule.

After a join or relationship, inspect unmatched records and null join keys. Keep join-key data types consistent and validate whether missing keys should match, remain unmatched, or be removed.

Tableau Server and Tableau Cloud use the same calculation and filtering semantics as Tableau Desktop. Published extracts preserve the values supplied by the source; scheduled refreshes do not automatically correct nulls, so validation belongs in Tableau Prep or upstream when it is a recurring data-quality issue.

Code Example

Create these fields with Analysis > Create Calculated Field:

// Tableau calculated field: Sales Clean
IFNULL([Sales], 0)
// Tableau calculated field: Sales Status
IF ISNULL([Sales]) THEN
    "Missing"
ELSE
    "Present"
END
// Tableau calculated field: Customer Sales including missing sales as zero
{ FIXED [Customer] : SUM(IFNULL([Sales], 0)) }

Best Practices

  • Preserve the distinction between null, zero, and not applicable.

  • Use null filters for incomplete records only when excluding them is analytically valid.

  • Prefer explicit status fields such as "Missing" so dashboards do not silently hide data-quality problems.

  • Validate join keys in Tableau Prep before publishing a workbook.

  • Apply heavy filtering and aggregation upstream to improve extract and dashboard performance.

  • Minimize unnecessary FIXED, INCLUDE, and EXCLUDE calculations, particularly on large datasets.

  • Label or color missing values distinctly so users do not interpret them as genuine zero results.

39

How do you create a profit ratio calculated field in Tableau?

A profit ratio calculated field divides aggregated profit by aggregated sales. Tableau should calculate the ratio of totals rather than average individual row-level percentages when the objective is overall profitability.

Read full answer

Applies toTableau Desktop, Tableau Prep, Tableau Server, and Tableau Cloud (current releases)

How It Works

The standard profit ratio is:

Total Profit / Total Sales

In Tableau, use SUM() for both measures so the calculation responds to the current level of detail, such as category, region, or year. Dividing the two aggregate values produces one ratio at each level in the view.

Format the result as a percentage rather than leaving it as a decimal.

Creating the Calculated Field

  1. Connect to the data and drag a worksheet into the view.

  2. In the Data pane, locate the Sales and Profit fields.

  3. Right-click a data field and select Create > Calculated Field, or select Analysis > Create > Calculated Field.

  4. Name the field Profit Ratio.

  5. Enter the guarded aggregate formula shown in the Code Example section and select OK.

  6. Drag Profit Ratio into the view.

  7. Right-click Profit Ratio in the Data pane and choose Default Format… > Number. Select Percentage and the desired decimal precision.

Example with Expected Result

Assume the Orders data contains:

Order ID Sales Profit
1001 100 20
1002 200 50

At the total level:

  • Total sales = 100 + 200 = 300

  • Total profit = 20 + 50 = 70

  • Profit ratio = 70 / 300 = 0.2333

  • Displayed result = 23.33%

The average of the row-level ratios is (20% + 25%) / 2 = 22.5%. That is different from the ratio of totals, 23.33%, and is generally less appropriate when order sizes differ.

Order of Operations and Platform Considerations

  • Tableau evaluates ordinary aggregate calculations after relevant dimension filters. Filtering by Category, Region, or Order Date therefore changes the profit and sales included in Profit Ratio.

  • Data-source, extract, and context filters are evaluated earlier than regular dimension filters. Table calculations run after aggregate calculations, so define the required aggregation level before adding one.

  • No LOD expression is required. If one is introduced, remember that FIXED LOD calculations run before INCLUDE and EXCLUDE calculations and before table calculations.

  • Tableau Prep: Use Prep for cleaning, joins, profiling, and preparing the output. Create the workbook-level calculated field in Tableau Desktop after connecting to the prepared data.

  • Tableau Server and Tableau Cloud: A calculated field authored in Desktop is stored in the workbook and evaluated when Tableau queries the data for a view. Refreshing an extract or source updates the underlying data rather than the calculated-field definition.

  • Live connections and extracts: The formula works with either connection type, but extract filters, source filters, and user permissions can affect which records contribute to the result.

Code Example

Use this as the Profit Ratio calculated-field formula:

IF SUM([Sales]) = 0 THEN NULL
ELSE SUM([Profit]) / SUM([Sales])
END

The zero-sales check prevents division by zero. Returning NULL is preferable to returning 0 because no meaningful profitability ratio exists when total sales are zero.

Best Practices and Common Pitfalls

  • Use aggregated totals: SUM([Profit]) / SUM([Sales]) is generally more appropriate than averaging row-level profit ratios.

  • Check denominator behavior: Handle zero sales explicitly, and confirm how null sales are handled in the source data.

  • Test at multiple levels: Verify the calculation by total, category, and time period, including relevant filters and context filters.

  • Use extracts for large sources: Extracts commonly improve performance. Pre-aggregation in Prep can also reduce row counts, but use it only when the required detail and drill-down behavior are preserved.

  • Format explicitly: Display the result as a percentage with consistent decimal precision.

40

How can you compare actuals with targets in Tableau?

Compare actual values and target values by placing them on the same Tableau view, calculating the variance and variance percentage, and using color or reference lines to show whether performance met the target. The calculation depends on whether targets are stored in the same data source as actuals or combined from another source.

Read full answer

Applies toTableau Desktop, Tableau Prep Builder, Tableau Server, and Tableau Cloud (current releases)

Core Approach

A practical Tableau comparison has three layers:

  1. Actual measure: The realized value, such as SUM([Actual Sales]).

  2. Target measure: The expected value, such as SUM([Target Sales]).

  3. Performance indicators: The absolute variance, percentage variance, and possibly an attainment percentage.

For example:

  • Target variance = Actual − Target

  • Variance percentage = (Actual − Target) / Target

  • Attainment percentage = Actual / Target

A positive variance means actuals exceeded the target. A negative variance means actuals fell below it.

Calculated Fields

Create calculated fields from Analysis > Create > Calculated Field.

Target Variance:

SUM([Actual Sales]) - SUM([Target Sales])

Variance Percentage:

IIF(
    SUM([Target Sales]) = 0,
    NULL,
    (SUM([Actual Sales]) - SUM([Target Sales])) / SUM([Target Sales])
)

Attainment Percentage:

IIF(
    SUM([Target Sales]) = 0,
    NULL,
    SUM([Actual Sales]) / SUM([Target Sales])
)

Returning NULL when the target is zero avoids division-by-zero errors. Format these fields as percentages by choosing Number Format > Percentage in the calculated field editor.

If the target is stored at a different grain (e.g., monthly targets vs. daily transactions), do not join the tables at the transaction level because that duplicates the target rows. Instead, use Tableau’s relationships (logical layer) to link the tables on the common dimensions (Region, Month). Relationships automatically aggregate each table to the appropriate grain before combining them. Alternatively, aggregate the actuals to the target grain in Tableau Prep or a custom SQL query before joining, or use data blending. A FIXED LOD expression on the joined data cannot undo duplication caused by a join; it only works when the target is already at the correct grain in the data source.

Code Example

To build the report:

  1. Drag Region and Month to Columns.

  2. Drag SUM([Actual Sales]) and SUM([Target Sales]) to Text or Columns.

  3. Drag [Target Variance] and [Variance Percentage] to Text.

  4. Change the actual measure to a bar chart.

  5. Add the target as a second bar or line using Measure Values.

  6. Add [Performance Status] to Color if conditional formatting is useful.

A useful status field is:

IF SUM([Actual Sales]) >= SUM([Target Sales]) THEN
    "Met or Exceeded Target"
ELSE
    "Below Target"
END

For a clearer dashboard, use actuals as bars and the target as a line or reference marker. A bullet chart is particularly effective for comparing several regions against their individual targets.

Sample Data and Expected Result

Assume the source contains:

Region Month Actual Sales Target Sales
North Jan 120 100
North Feb 90 110
South Jan 150 140
South Feb 130 160

With Region and Month as the view dimensions, the expected results are:

Region Month Actual Target Variance Variance %
North Jan 120 100 20 20.00%
North Feb 90 110 -20 -18.18%
South Jan 150 140 10 7.14%
South Feb 130 160 -30 -18.75%
Total 490 510 -20 -3.92%

The total variance percentage is calculated as (490 - 510) / 510, or approximately -3.92%.

Best Practices

  • Check the data grain: Ensure actual and target rows represent comparable periods, regions, products, and other dimensions.

  • Avoid double-counting targets: Do not join a monthly target to transaction-level data; use relationships or pre-aggregate actuals to the target grain.

  • Choose the correct aggregation: Use SUM, AVG, or another aggregate according to the business meaning of the measure.

  • Filter deliberately: Dimension filters can change aggregated values; context filters are useful when calculations must be evaluated before ordinary dimension filters.

  • Keep table calculations last: Table calculations operate on aggregated results, so they should not be confused with row-level or LOD calculations.

  • Use descriptive labels: Label the measure as “Target Variance” and explain the sign convention in a dashboard caption or tooltip.

Preparing and Publishing

Use Tableau Prep to clean and reconcile actual and target sources before connecting the data to Tableau Desktop. If the data is large or dashboards are accessed frequently, an extract can improve performance. For live connections, monitor database performance and push filtering and aggregation to the source where possible.

In Tableau Server or Tableau Cloud, publish the workbook, control permissions, and use scheduled refreshes for extracts. Validate the target logic with stakeholders, especially the variance sign convention and the treatment of zero or missing targets.

41

What is Tableau's Analytics pane?

The Analytics pane in Tableau Desktop provides drag-and-drop analytical enhancements for a view, including reference lines, totals, trend lines, forecasts and distribution summaries. It lets analysts add standard statistical analysis quickly without writing a calculated field for every operation.

Read full answer

Applies toTableau Desktop (current release)

Purpose and Scope

The Analytics pane helps analysts move beyond marks that simply encode values. It can add context, reveal patterns and support forecasting while preserving the workbook’s underlying data model.

It is not a replacement for calculated fields:

  • Use the Analytics pane for built-in summaries and visual enhancements.

  • Use Analysis > Create Calculated Field for reusable business logic.

  • Use an LOD expression when a calculation must be evaluated at a specific level of detail.

  • Use a table calculation when the result depends on the rows or columns displayed in the view.

Tableau Prep does not have the Analytics pane. Tableau Server primarily publishes and governs workbooks, while Tableau Cloud provides web editing where users have appropriate permissions. Enhancements added in Desktop are stored in the workbook and remain visible to authorized viewers.

Available Enhancements

The pane contains options such as:

Option Purpose Typical use
Reference Line Adds a horizontal, vertical or slope line Budget, target or average
Reference Band Adds a shaded range Acceptable performance range
Distribution Band Colors marks according to a distribution High, medium and low values
Box & Whisker Plot Shows quartiles, the median and whiskers Sales distribution by product
Median Adds the median as a reference Typical transaction value
Total Adds totals at a specified level Subtotals by category
Grand Total Adds the overall total Total sales across the view
Trend Line Fits a trend to aggregated measures Revenue over time
Forecast Extends a trend into future periods Monthly demand projection
Cluster Identifies similar groups of marks Customer segmentation

Some options are table calculations and therefore operate after filters, measures and LOD expressions have been evaluated.

How to Use It

  1. Build the view with a discrete dimension, such as Region, and an aggregated measure, such as SUM(Sales).

  2. Open View > Show Panes > Analytics Pane if the pane is hidden.

  3. Drag the required option from the Analytics pane into the view.

  4. Configure the option through the displayed controls or the pill’s context menu.

  5. For a table calculation, select Edit Table Calculation to choose its addressing fields and calculation order.

  6. For custom business logic that the pane cannot provide, select Analysis > Create Calculated Field.

For example, Tableau’s Percent of Grand Total quick table calculation for SUM(Sales) is equivalent to:

SUM([Sales]) / TOTAL(SUM([Sales]))

The pane is especially useful for reference analysis. Suppose quarterly regional sales are:

Region Sales
North 1,200
South 1,500
East 1,800

Create a bar chart with Region on Columns and SUM(Sales) on Rows. Drag Reference Line into the view and set it to the constant value 1500; drag Grand Total into the view and retain the Sum aggregation. The expected result is a horizontal reference line at 1,500 and a grand total of 4,500. North is 300 below the target, South is on target and East is 300 above it.

Filters and Calculation Order

Analytics-pane table calculations are evaluated after underlying query processing. Tableau’s relevant order is:

  1. Extract filters

  2. Data source filters

  3. Context filters

  4. Dimension filters

  5. Measures

  6. LOD expressions

  7. Table calculations

Consequently, a dimension filter normally changes the population used by totals, percentages and other table calculations. LOD expressions are also evaluated before table calculations. Within LOD processing, Tableau applies FIXED expressions before INCLUDE, then EXCLUDE.

Use Add to Context only when a filter must affect an LOD expression reliably; context filters are more restrictive and can make troubleshooting harder.

Best Practices and Common Pitfalls

  • Match the analysis to the level of detail: Use FIXED, INCLUDE or EXCLUDE for reusable row-level context rather than forcing a table calculation to perform that job.

  • Keep table calculations focused: Limit addressing fields to the smallest valid scope to reduce complexity and improve performance.

  • Check aggregations first: A total of SUM(Sales) is different from a table calculation over an average, so confirm the pill’s aggregation.

  • Avoid redundant summaries: Do not add Total, Grand Total and the same measure label unless each serves a distinct level.

  • Design for interpretation: Format reference lines with meaningful labels, units and colors. A target line should say “Target: 1,500”, not just “Reference Line”.

  • Validate after filtering: Percentages, rankings and forecasts can change when filters change the rows included in the view.

  • Use calculated fields for business rules: For reusable definitions such as variance, margin or target attainment, create a named calculated field and document its aggregation and business meaning.

42

How do you add trend lines and forecasts in Tableau Desktop?

Use Tableau’s Analytics pane to add a regression trend line or an exponential-smoothing forecast. A trend line fits existing marks, while a forecast extends a date-based measure into future periods and displays an uncertainty band.

Read full answer

Applies toTableau Desktop 2024.2; Tableau Cloud (current release) and Tableau Server 2019.1 or later for the corresponding features

Adding a trend line

  1. Create a time-series view with a continuous date on Columns and a continuous measure such as SUM(Sales) on Rows. Right-click the date and choose Convert to Continuous if necessary.

  2. If the pane is hidden, select View > Show Analytics Pane.

  3. Drag Trend Line from the Analytics pane onto the view.

  4. Select Linear, Logarithmic, Exponential, Power, or Polynomial. For a polynomial model, also select the degree.

  5. Click OK. The fitted line appears, and the tooltip reports the equation and R².

Right-click the trend-line layer to edit or remove it.

Adding a forecast

  1. Use the same continuous-date and continuous-measure view.

  2. Drag Forecast from the Analytics pane onto the view.

  3. Select Exponential Smoothing as the forecast method. For seasonality, use automatic detection or specify a season length, such as 12 for monthly data with yearly seasonality.

  4. Click OK. Tableau displays the forecast portion and its confidence band.

The standard Forecast card does not expose a forecast-horizon setting. A date parameter does not change that horizon. Right-click the forecast layer to change its settings or remove it.

Models and business example

Analysis Available models Main result
Trend line Linear, logarithmic, exponential, power, polynomial Fitted curve and R²
Forecast Exponential smoothing with optional seasonality Future values and confidence band

For monthly sales, MONTH(Order Date) must remain continuous and monthly:

Month Sales
Jan 2024 120,000
Feb 2024 134,500
Mar 2024 129,800
Apr 2024 151,200
May 2024 168,400
Jun 2024 160,900

With January numbered 1, the linear trend is approximately Sales = 111,373 + 9,360 × month_index, with R² ≈ 0.85. It predicts approximately 176,893 for July 2024.

The expected forecast result is a continuation after June 2024 with an uncertainty band. However, six observations are insufficient to estimate a 12-month seasonal cycle, so the forecast is illustrative rather than reliable; use at least two complete seasonal cycles before trusting seasonal results.

Order of operations and filters

Tableau’s core calculation order is:

Extract filters → data-source filters → context filters → data-partition filters → FIXED LOD → dimension filters → INCLUDE LOD → EXCLUDE LOD → table calculations

Consequently, an ordinary dimension filter does not change a FIXED value, although it can remove marks from the view. A context filter is evaluated earlier and therefore affects the FIXED result. Trend lines and forecasts use the marks remaining in the filtered view, so restrictive filters can reduce the history available to the models.

Code Example

These are optional supporting calculations; paste each into a separate Tableau calculated field.

{ FIXED [Product] : SUM([Sales]) }
IF FIRST() = 0 THEN
    WINDOW_AVG(SUM([Sales]), -2, 0)
END

The second field calculates a trailing three-period moving average. Set Compute Using to the relevant date period, such as Month, so the window follows the intended chronological order.

Best practices, publishing, and pitfalls

  • Use enough history for the selected forecast method; yearly seasonality requires multiple complete yearly cycles.

  • Preserve a date grain that represents the business behavior. Aggregating daily data to YEAR prevents monthly or weekly seasonality from being modeled.

  • Treat R² as descriptive rather than causal, and inspect the fitted curve before publishing it.

  • Large numbers of date marks increase visualization cost. Aggregate only to a meaningful business grain and use extracts where appropriate.

  • Tableau Prep can clean, shape, and publish extract data, but it does not create Desktop analytics-pane trend lines or forecasts.

  • Publish supported workbooks to Tableau Server or Tableau Cloud, but use a Desktop release compatible with the target Server version. Refresh extracts before comparing Desktop and published results.

  • For ARIMA, Prophet, or custom regression, use an analytics extension or external pipeline and expose its output as a field or materialized dataset rather than an ordinary calculated field.

43

How do you use reference lines, bands, and distributions in Tableau?

Reference lines mark exact thresholds or benchmarks, reference bands highlight an acceptable range, and distributions show how values are spread. Together, they make targets, variance, concentration, and outliers visible in a Tableau worksheet.

Read full answer

Applies toTableau Desktop (current release); Tableau Server and Tableau Cloud (current releases, for viewing published workbooks)

Reference Lines, Bands, and Distributions

Tool Purpose Typical example
Reference line Marks one value on an axis Target sales of 100,000
Reference band Shades an interval between two axis values Acceptable sales range of 80,000–120,000
Distribution Shows concentration and variation Histogram, box-and-whisker plot, or density overlay

Reference lines and bands work with continuous measures and dates. A band uses lower and upper bounds expressed in the selected axis units.

A distribution can be presented as:

  • Statistical distribution: Drag Histogram or Box & Whisker from the Analytics pane.

  • Distribution overlay: In the Format pane, choose Distribution > Add Distribution, select the measure and aggregation, and configure options such as scope, bandwidth, and size where applicable.

For general business audiences, histograms and box plots are usually easier to interpret than density overlays.

Configuration Steps

  1. Create the chart

  2. Drag a continuous measure such as Sales to Columns or Rows.

  3. Add a relevant dimension, such as Region or Month, to the other shelf.

  4. Add a reference line

  5. Open the Format pane and choose Reference Line > Add Reference Line.

  6. Under Value, select Constant, Parameter, or Field.

  7. Configure the label, color, width, and scope: Entire View, Pane, or Cell.

  8. Add a reference band

  9. Choose Reference Band > Add Reference Band.

  10. Define the From and To bounds.

  11. Apply a light, accessible fill and optional boundary line.

  12. Use Entire View for a shared benchmark. Cell repeats the band within each cell; different category-specific bounds require fields or separate worksheets rather than scope alone.

  13. Show a distribution

  14. For a box plot, drag Box & Whisker from the Analytics pane and select Sales as the measure.

  15. For a histogram, drag Histogram and review its measure and automatic binning.

  16. In the Format pane, select Distribution > Add Distribution to create an overlay.

Business Example

Suppose monthly sales contain the following data:

Month Sales
Jan 70,000
Feb 80,000
Mar 90,000
Apr 100,000
May 110,000
Jun 120,000
Jul 130,000
Aug 140,000

Configure a reference line at 100,000, a reference band from 80,000 to 120,000, and a box-and-whisker plot for Sales.

The expected result is:

  • The reference line appears just below the distribution center.

  • Both the mean and median are 105,000.

  • Five of the eight observations, or 62.5%, fall within the inclusive target band.

  • One observation falls below the band and two are above it.

Code Example

Create integer parameters named Target Lower and Target Upper, with values 80000 and 120000. With a row-level source measure named Sales, create this calculated field:

IF [Sales] >= [Target Lower]
AND [Sales] <= [Target Upper]
THEN "Within target band"
ELSE
    "Outside target band"
END

For a regional benchmark that remains stable when ordinary dimension filters change, use a FIXED LOD expression:

{ FIXED [Region] : AVG([Sales]) }

Use this field as the value of a reference line when each region should retain its own benchmark.

Order of Operations

  • Filters: Constant reference lines and bands do not change. Field-based aggregate reference values respond to applicable filters.

  • LOD expressions: FIXED expressions are evaluated after data-source and context filters but before ordinary dimension filters. Consequently, a FIXED-based reference line does not change with ordinary dimension filters.

  • Table calculations: These run after aggregation and generally affect the displayed marks rather than a constant reference line or band.

  • Distributions: They describe the measure values remaining after applicable filtering, aggregation, and mark-level processing.

Performance and Design Best Practices

  • Prepare large extracts and aggregations in Tableau Prep before publishing to Tableau Server or Tableau Cloud.

  • Prefer parameters or simple aggregate fields for benchmarks; avoid unnecessary row-level calculations.

  • Use FIXED LOD expressions carefully because they can increase memory usage and processing time.

  • Keep reference lines thin and bands lightly shaded so they do not obscure the marks.

  • Label thresholds with business meaning, such as Target or Acceptable range.

  • Use Entire View when all marks share one benchmark; use Cell only when repeating the benchmark within each mark is meaningful.

  • Inspect distribution outliers before excluding them; legitimate high-performing periods should not be removed merely to improve the chart.

44

How do you publish workbooks to Tableau Server or Tableau Cloud?

Publishing a workbook transfers a Tableau workbook and its data to a site on Tableau Server or Tableau Cloud, where authorized users can access it and administrators can manage permissions, refreshes, and subscriptions centrally.

Read full answer

Applies toTableau Desktop (current release), Tableau Server (current release), Tableau Cloud (current release)

Before You Publish

  • Save locally: Save the workbook as a .twb file and confirm that it opens correctly in Tableau Desktop.

  • Validate calculations: Check calculated fields, LOD expressions, table calculations, filters, and dashboard actions. Publishing does not change their behavior.

  • Check connectivity: Confirm that Server or Cloud can reach the source. Tableau Cloud uses Tableau Bridge for supported private on-premises data.

  • Choose a location: Confirm the destination site and project and ensure your account can publish there.

  • Tableau Prep: Prep does not publish an interactive workbook. A Prep flow’s output can be published as a data source, and Tableau Prep Conductor can manage scheduled flow runs on Server or Cloud.

Publish from Tableau Desktop

  1. Open the workbook in Tableau Desktop.

  2. Select Server in the top menu.

  3. Choose Tableau Server or Tableau Cloud, then select Publish Workbook.

  4. Sign in with your organization account.

  5. Select the destination site and project.

  6. Enter a clear workbook name and, when available, provide a description.

  7. Choose the data-source option:

  8. Embed data with workbook: Includes the required extract in the workbook.

  9. Publish data source separately: Publishes the data source as a reusable site asset and connects the workbook to it.

  10. Select Publish.

  11. Open the destination project, verify the workbook and dashboards, and review Edit Permissions for project and workbook access.

Server, Cloud, and Data Behavior

Consideration Tableau Server Tableau Cloud
Hosting Managed by your organization Hosted by Salesforce
Authentication Local authentication or federation through a supported identity provider Tableau Cloud sign-in and MFA or federation through a configured identity provider
Publication Tableau Desktop to a Server site Tableau Desktop to a Tableau Cloud site
Private data Can connect directly to supported on-premises or cloud-accessible sources Uses Tableau Bridge for supported private on-premises sources
  • Extract: A snapshot stored using Tableau’s Hyper extract engine. Embedded extracts simplify distribution; separately published data sources are easier to reuse and refresh centrally.

  • Live connection: Tableau queries the source when the workbook opens. Server or Cloud must be able to reach it.

  • Local files: An Excel or CSV file cannot normally remain a live connection after publication. Create an extract or move the source to a supported server.

  • Refresh: Embedded and separately published extracts can be refreshed on Tableau Server or Tableau Cloud after credentials and connectivity have been validated.

  • Subscriptions: Administrators can schedule workbook subscriptions once the workbook has been published and permissions are correct.

Business Example

Suppose the workbook contains:

Region Month Sales
North January 120,000
South January 95,000
North February 140,000

The workbook uses SUM([Sales]), includes a regional filter, and presents sales by region and month in a dashboard.

After publishing it to Sales Analytics → Regional Performance with an embedded extract:

  • The workbook appears under Regional Performance on the selected site.

  • Authorized users can filter the dashboard by region or month.

  • North sales total 260,000, South sales total 95,000, and overall sales total 355,000.

  • Users without project access cannot open the workbook.

  • An administrator can configure and monitor its extract refresh.

Code Example

For automation, install tabcmd, create a personal access token with permission to publish, and use the appropriate Tableau Server or Tableau Cloud URL:

export TABLEAU_SERVER="https://tableau.example.com"
export TABLEAU_SITE="SalesOrg"
export TABLEAU_TOKEN_NAME="publish-workbooks"
read -rsp "Tableau token secret: " TABLEAU_TOKEN_SECRET; echo

tabcmd login \
  --server "$TABLEAU_SERVER" \
  --site "$TABLEAU_SITE" \
  --token-name "$TABLEAU_TOKEN_NAME" \
  --token-secret "$TABLEAU_TOKEN_SECRET"

tabcmd publish "/reports/Regional Performance.twb" \
  --server "$TABLEAU_SERVER" \
  --site "$TABLEAU_SITE" \
  --project "Regional Performance" \
  --name "Regional Performance"

This example assumes the .twb contains an embedded extract. For Tableau Cloud, use the site’s Tableau Cloud URL and the site’s content-management permissions.

Best Practices and Common Pitfalls

  • Use meaningful names: Organize by team or business process and avoid names such as Final_Final_v3.

  • Control sensitive data: Publish only necessary fields and apply row-level or object-level security where appropriate.

  • Optimize extracts: Filter unnecessary rows, aggregate data at the source when practical, and avoid oversized extracts.

  • Reuse data sources: Publish frequently used data separately rather than duplicating it across workbooks.

  • Test access: Use Tableau’s user-preview capabilities where available and confirm project and workbook permissions.

  • Retain the source file: Keep the authoritative .twb in version control or another controlled repository.

  • Avoid local-only dependencies: A workbook that works on the author’s machine may fail on Server or Cloud if it relies on unavailable files, credentials, or network routes.

45

How do you schedule Tableau extract refreshes?

An extract refresh schedule automatically updates a Tableau extract from its source. Configure it in Tableau Server or Tableau Cloud for published data sources; Tableau Desktop supports manual extract refreshes, while Tableau Prep Conductor schedules complete flow runs.

Read full answer

Applies toTableau Desktop, Tableau Prep, Tableau Server, and Tableau Cloud (current releases); Tableau Prep Conductor in Tableau Server and Tableau Cloud

Scheduling a Published Extract Refresh

  1. Publish a data source that uses an extract and sign in to Tableau Server or Tableau Cloud.

  2. Open the published data source:

  3. Tableau Server: Data > Datasources > [data source] > Refresh > Schedule

  4. Tableau Cloud: Data > [data source] > Refresh > Schedule

  5. Configure the schedule:

  6. Frequency: Select one of the frequencies offered by the environment, such as hourly, daily, weekly, or monthly.

  7. Start time and time zone: Choose when the refresh should run.

  8. Refresh type: Select full or incremental refresh where the data source and connection support it.

  9. Notifications: Enable the available completion or failure notifications and configure recipients according to site settings.

  10. Save the schedule. It then runs on the server without requiring Tableau Desktop to remain open.

A live connection is not refreshed by this schedule because Tableau queries the underlying source directly. A workbook subscription sends subscribed views or snapshots; it does not refresh the data source extract.

Choosing Full or Incremental Refresh

Refresh type Behaviour Best suited for
Full refresh Rebuilds the entire extract Small sources, corrected or deleted records, and late-arriving data
Incremental refresh Appends rows whose increment value is greater than the previously stored value Large sources with a reliable date, time, or numeric increment field

Incremental refresh does not automatically update existing rows or remove deleted records. If rows can arrive late with an increment value lower than the stored value, use a full refresh or implement a source-side correction strategy.

Business Example

The extract initially contains:

Order ID Order Date Status Sales Amount
1001 2025-01-01 Shipped 100
1002 2025-01-02 Shipped 150
1003 2025-01-02 Pending 50

Before the scheduled refresh, the source receives this row:

Order ID Order Date Status Sales Amount
1004 2025-01-03 Shipped 200

After the extract refreshes, the expected results are:

Measure Before Refresh After Refresh
Number of orders (COUNTD([Order ID])) 3 4
Revenue 300 500
Shipped revenue 250 450

The workbook calculations evaluate against the refreshed extract and therefore include the new shipped order.

Desktop, Prep, Server, and Cloud

Component Refresh capability
Tableau Desktop Refresh an extract manually; Desktop does not create server-side extract schedules
Tableau Server Schedules published data-source extract refreshes and Tableau Prep flow runs
Tableau Cloud Schedules published data-source extract refreshes and supports managed Tableau Prep Conductor flows
Tableau Prep Conductor Schedules flow runs containing extraction, transformation, and publication of outputs

Use a published extract schedule when existing workbooks can consume the refreshed data source directly. Use Tableau Prep Conductor when transformations must run before the output is published.

Code Example

Create the Revenue calculated field with this Tableau formula:

// Revenue
SUM([Sales Amount])

Create the Shipped Revenue calculated field with:

// Shipped Revenue
SUM(IF [Status] = "Shipped" THEN [Sales Amount] END)

For the example, the expected refreshed values are Revenue = 500 and Shipped Revenue = 450.

Best Practices and Calculation Order

  • Prefer the built-in scheduler: It runs independently of Desktop and is easier for administrators to monitor and audit.

  • Use incremental refresh carefully: Confirm that the increment field is reliable and that late updates and deletes are handled separately.

  • Configure monitoring: Review refresh history and test email delivery. On Tableau Server, verify that SMTP and the relevant notification settings are configured.

  • Control extract size: Apply source-level filters where appropriate, while recognizing that they permanently restrict the data available through the extract.

  • Respect operation order: Extract refresh occurs before workbook calculations. FIXED LOD expressions are evaluated before ordinary dimension filters unless those filters are context filters; INCLUDE and EXCLUDE are evaluated after ordinary dimension filters, and table calculations run last.

  • Do not confuse subscriptions with refreshes: A subscription delivers workbook content on a schedule but does not update the underlying extract.

46

How do you configure row-level security in Tableau?

Row-level security (RLS) in Tableau restricts the rows a user can query according to the user’s identity, group membership, or role. A common workbook implementation combines a user-access table with a Boolean calculated field containing USERNAME(), then applies it as a data-source filter.

Read full answer

Applies toTableau Desktop, Tableau Prep, Tableau Cloud, and Tableau Server (current releases)

How RLS Works

Tableau applies a correctly configured RLS filter before measures are aggregated, so unauthorized rows do not contribute to totals, percentages, or dashboards. For example, a regional analyst might see only East-region orders, while a national manager sees all permitted regions.

Mechanism Where it is configured Purpose
Filter-based RLS Tableau Desktop workbook Restrict rows using USERNAME(), group information, or another identity attribute
Policy-based RLS Tableau Cloud or Tableau Server virtual connection Centrally administer row filters for users and groups
Data-source permissions Tableau Cloud or Tableau Server Restrict access to the data source, tables, or fields; these permissions do not create row filters by themselves

Configure Filter-Based RLS

  1. Prepare an access table containing each user and the regions, departments, accounts, or roles they may access.

  2. Connect the access and transactional tables within the same Tableau data source.

  3. On the Data Source tab, create a relationship using the shared access key, such as Orders.Region to UserAccess.Region. Use unique field names to prevent ambiguous references.

  4. In the Data pane, right-click the data source and select Create > Calculated Field. Name it Tableau RLS and use the calculation in the code example below.

  5. Apply Tableau RLS as a data-source filter: right-click the data source, select Add > Filter, choose Tableau RLS, add it to the worksheets, and select True.

  6. Publish the workbook and test it as every affected user or group using impersonation or another server-side test account.

If a workbook contains several data sources, apply the filter to every source containing protected rows.

Sample Data and Expected Result

User-access data:

AccessUserName Region
alice East
bob West

Order data:

OrderID Region Sales
1001 East 500
1002 West 300
1003 East 200

With UserAccess.Region related to Orders.Region, the RLS calculation retains only rows matched to the signed-in user’s access record:

  • alice sees orders 1001 and 1003; expected total: 700

  • bob sees order 1002; expected total: 300

Keep user-region combinations unique because duplicate access rows can create ambiguous or repeated matches.

Server, Cloud, and Prep Considerations

Current Tableau Cloud and Tableau Server releases can centrally administer RLS through a row-level-security policy on a virtual connection. Configure the policy to associate users or groups with row-filter conditions, then publish the data source through that virtual connection.

The ordinary Edit Permissions dialog for a data source grants source and field or table access; it does not define row-level filters. Use it only as defense in depth alongside RLS.

Tableau Prep can prepare and maintain access tables or secured outputs, but it is not by itself the final enforcement boundary for published Tableau views. Enforcement must occur in the workbook, virtual-connection policy, or underlying database.

Code Example

Create this Boolean calculated field:

IF [AccessUserName] = USERNAME() THEN TRUE ELSE FALSE END

USERNAME() returns the identity of the current Tableau user. Ensure AccessUserName stores the exact identity value returned in the relevant Tableau environment; do not assume it is always an email address.

Order of Operations and Best Practices

  • Apply RLS early: Prefer a data-source filter. Tableau’s relevant order is extract filters, data-source filters, context filters, dimension filters, FIXED LOD, INCLUDE/EXCLUDE LOD, and table calculations. A regular dimension filter may run after FIXED expressions.

  • Handle extracts carefully: Do not bake a per-user predicate into a shared extract during refresh. Keep the restriction at query time, use separately secured extracts, or use a virtual-connection policy.

  • Protect direct access: A workbook filter does not protect a separately published unrestricted data source. Secure the source itself and restrict who can edit the workbook or its connections.

  • Model access cleanly: Use a small, normalized access table, unique relationship keys, and consistent identity values.

  • Test every authorization path: Test direct workbook access, dashboards, subscriptions, exports, extracts, and published data-source access—not only the dashboard UI.

  • Use stronger controls where required: Database-native row security or secured views can provide an additional or primary security boundary.

  • Do not rely on visibility: Hiding a worksheet, field, or filter control is not RLS.

47

What are user filters in Tableau?

User filters are viewer-controlled filters that let dashboard users change which data or members are included, usually through a filter card or a filter action. They change the current interaction without modifying the underlying data source, relationships, or workbook calculations.

Read full answer

Applies toTableau Desktop, Tableau Server, and Tableau Cloud (current releases)

How They Work

Tableau authors configure filters in worksheets and expose the relevant controls on dashboards. In practice, “user filters” usually means one of these interactive mechanisms:

  • Filter cards: Viewers select values from a dimension or measure. These are often described as quick filters.

  • Filter actions: Selecting a mark in a source worksheet filters one or more target worksheets.

  • Exposed worksheet filters: A filter configured on a worksheet can be displayed as a dashboard card and remain interactive.

Most filter cards filter dimensions, but measure filters can also be exposed. Common capabilities include:

  • Including or excluding selected members

  • Selecting one or multiple values

  • Filtering using absolute or relative dates

  • Displaying discrete dimensions as value lists and numeric or continuous fields as ranges or sliders

  • Applying the filter to selected worksheets, the data source, or all worksheets using related data sources

To expose a filter card in Tableau Desktop:

  1. Drag a field, such as Region, onto a worksheet’s Filters shelf.

  2. Configure the filter’s matching mode and value-selection behavior.

  3. On the Dashboard tab, select the worksheet or its filter and choose Show Filter.

  4. Use the card menu to choose a display mode such as Single Value (dropdown), Multiple Values (list), Slider, or Range.

  5. Review Apply to Worksheets so the filter affects only the intended worksheets.

To create a filter action, choose Dashboard > Add Actions > Filter, then define the source worksheet, target worksheets, source fields, and clearing behavior.

Business Example

Suppose a sales dashboard uses the following extract or live data:

Region Product Sales Profit
East A 100 30
East B 80 10
West A 120 40
West B 90 15

The dashboard exposes a Region filter card.

Selected value Expected result
East East–A and East–B rows; sales 180, profit 40
West West–A and West–B rows; sales 210, profit 55

This lets each regional manager focus on relevant records while other users interact with the same published dashboard. The All display mode, when available, makes the complete set of region values visible rather than adding All as a value to the underlying field.

Filter Order of Operations

Tableau’s general evaluation order is:

  1. Extract filters

  2. Data source filters

  3. Context filters

  4. Dimension filters

  5. FIXED LOD expressions

  6. INCLUDE LOD expressions

  7. EXCLUDE LOD expressions

  8. Table calculations

An ordinary dimension filter therefore affects the rows considered before a FIXED LOD expression is evaluated. A calculated measure such as SUM([Sales]) aggregates the included rows, while a table calculation such as RUNNING_SUM(SUM([Sales])) runs after the filtered aggregation and within its configured table-calculation addressing and partitioning.

If a dimension filter must affect a FIXED calculation in the intended way, add it to Context. Context filters are evaluated before FIXED LOD expressions and can produce different results from the same field used as an ordinary dimension filter.

Server, Cloud, and Permissions

Published filter cards and filter actions remain viewer-controlled in Tableau Server and Tableau Cloud. The workbook author determines which fields are exposed, their display settings, and which worksheets they affect. These controls work with both live connections and extracts and do not alter the source’s joins or relationships.

Tableau Prep is a data-preparation environment and does not provide dashboard user-filter controls; it prepares data used by Tableau Desktop, Server, or Cloud.

User filters are not security boundaries. Use permissions, row-level security, and appropriate data models when users must be prevented from accessing records.

Best Practices and Common Pitfalls

  • Expose only useful filters: Too many controls make dashboards difficult to explore.

  • Use business-friendly labels: Rename technical fields and explain filter scope clearly.

  • Set a meaningful default: Start with a useful selection where appropriate, and use the All display mode when users should easily see every available member.

  • Limit scope deliberately: A filter card can affect selected worksheets rather than every worksheet using the same data source.

  • Use context filters selectively: They can improve LOD correctness but may change database work and extract refresh behavior.

  • Test performance: Filtering live data can affect the query sent to the source, while filtering extracts can affect processing and usability. Test with production-like data volumes.

  • Distinguish parameters from filters: Parameters supply values to calculations; filters determine which rows or members participate in a view.

  • Do not use filters for access control: Interactive filters control presentation, not authorization.

48

What permissions control access in Tableau Server?

Permissions in Tableau Server determine what users can see and do with sites, projects, workbooks, data sources, and administrative functions. Effective access is governed by the user’s site role, group membership, project permissions, and any content-specific permissions.

Read full answer

Applies toTableau Server 2025.1

Permission Model

Tableau Server combines several layers of access control:

  • Site role: Establishes the user’s licensing level and maximum capabilities, such as viewing content, authoring, or administering a site.

  • Project permissions: Control access to content in a project. Permissions granted on a parent project are inherited by nested projects unless inheritance is locked.

  • Content permissions: Can be assigned directly to individual workbooks, data sources, and published Prep flows.

  • Group membership: Makes it easier to assign and maintain permissions for teams.

  • Permission locks: Prevent inherited project permissions from being changed for a locked project. A lock neither grants nor denies access by itself.

Permissions cannot give a user capabilities beyond those allowed by their site role. For example, granting a Viewer project permissions does not give the user authoring or administrative capabilities.

Server and Site Roles

Role Main capabilities
Server Administrator Administers the server, sites, users, projects, connections, and server-wide settings.
Site Administrator Creator Manages users, groups, projects, permissions, and settings within an assigned site, with Creator capabilities.
Site Administrator Explorer Manages a site with Explorer-level content capabilities.
Creator Connects to data and creates, edits, and publishes workbooks, data sources, and Prep flows.
Explorer Uses published content and connects to published data sources; can create and publish workbooks when project permissions allow.
Viewer Views and interacts with published content when the required project or content permissions are granted.
Unlicensed Has no Tableau Server content or authoring entitlement.

Users can have different site roles on different sites, but they must be appropriately licensed on each site.

Configuring Permissions

To assign a user and site role:

  1. Sign in to Tableau Server with administrative access.

  2. Open Server > Users & Groups.

  3. Select Add User and enter the user’s email address or account identifier.

  4. Add the user to the required site and select the appropriate site role.

  5. Create groups through Users & Groups > Groups when permissions should follow team membership.

To control access to a project:

  1. Open the target project.

  2. Select Permissions.

  3. Choose Add User or Group.

  4. Add the user or group and select the required capabilities.

  5. Save the permission changes.

  6. Validate the result with a test account belonging to the affected group.

For sensitive projects, lock inherited permissions where appropriate and test the effective access of each affected group.

Common Permission Capabilities

The available capabilities depend on the selected object, but commonly include:

  • Read: View and access published content.

  • Execute: Run a workbook or data source and retrieve its data.

  • Filter: Change filters within a workbook.

  • Export: Export workbook data in permitted formats.

  • Save: Save changes to a workbook.

  • Write: Publish or overwrite content in a project.

  • Delete: Remove content.

  • Move: Move content between projects when permitted.

  • Change Permissions: Delegate management of access rights.

  • Add Comment: Add comments to content.

  • Web Authoring: Edit a published workbook in the browser.

  • Lock: Prevent inherited project permissions from being changed.

Server- and site-administration capabilities come from the site role rather than a generic content permission called Administer.

For a live connection, the published data source can use credentials stored by Tableau Server or credentials supplied by the user; appropriate Tableau Server permissions still apply. With an extract, access is governed by the permissions protecting the extract and related published content.

Business Example

Suppose a company creates a restricted project named Finance - Restricted.

User Site role Project permission Expected result
Aisha Viewer Read, Execute, Filter Opens the finance dashboard and changes its filters.
Ben Explorer Read, Execute, Export Explores the dashboard and exports permitted data.
Chen Creator Read, Execute, Write, Save Opens, edits, and publishes workbooks in the project.
Dana Creator No permission Cannot access the restricted project or its content.

This demonstrates why both layers matter: Chen can publish because the role and project permissions allow it, while Dana cannot publish there despite being a Creator because project access is missing.

Best Practices and Common Pitfalls

  • Use groups for business teams: Assign permissions to groups such as Finance_Viewers instead of maintaining large user lists.

  • Apply least privilege: Grant only the capabilities required for each responsibility.

  • Separate authoring from consumption: Give most consumers Viewer access and reserve Explorer or Creator roles for analysts and report builders.

  • Treat extracts as protected content: Extracts can remove live database dependencies from clients, but they do not replace workbook and data-source permissions.

  • Review inherited permissions: Nested projects and group membership can grant more access than expected.

  • Protect database credentials: Store connection credentials securely on the server rather than embedding them in workbooks.

  • Test the actual user experience: Validate important dashboards and administrative tasks with non-administrator accounts.

  • Audit regularly: Review site roles, project permissions, group membership, orphaned accounts, and published data sources.

49

What does Tableau Performance Recorder capture and how do you use it?

Tableau Performance Recorder is a diagnostic tool that captures timestamped events and timing information while a user interacts with a workbook in Tableau Desktop. It helps narrow down whether delay occurs during data and query processing, an interaction, or view rendering.

Read full answer

Applies toTableau Desktop 2020.1 and later

How It Works

Performance Recorder instruments Tableau Desktop during a recording session. It records relevant user interactions and Tableau processing events, together with their durations. These can include filter or parameter changes and the work Tableau performs to service them, such as data-source queries and rendering.

When the recording is stopped, Tableau creates a performance recording file with the .perf extension. The file can be used during troubleshooting or shared with Tableau Support when further diagnosis is required.

The recorder observes the session without changing the workbook’s calculations, data, or published content. Recording itself introduces some overhead, so recorded timings are diagnostic evidence rather than production benchmarks.

How to Use Performance Recorder

  1. Open the workbook in Tableau Desktop.

  2. Select Help > Record Performance.

  3. Start the recording in the Performance Recorder dialog.

  4. Reproduce the slow behavior, such as selecting a filter or opening a dashboard.

  5. Stop the recording from the dialog or corresponding Help menu command.

  6. Save the resulting .perf file for investigation or support.

Record only the actions relevant to the problem. For example, if a dashboard becomes slow only after selecting a product category, record that selection rather than an entire browsing session.

Business Example

Consider a dashboard containing the following sales data:

Region Product Sales
East Widget 120
East Gadget 80
West Widget 150

The worksheet uses:

  • Region as a discrete dimension

  • Product as a discrete dimension

  • Sales as a continuous measure with SUM(Sales)

Selecting East should produce:

Region Sales
East 200

Suppose this filter responds immediately in the small sample but takes several seconds in production, where the source contains several million rows. A Performance Recorder session can show that the filter-selection event is responsible for most of the delay.

That result identifies where the delay occurs; it does not by itself prove the root cause. The analyst should then inspect the underlying data, relationships, filters, calculated fields, and rendering complexity.

Investigating the Slow Interaction

Use the recording timeline alongside Tableau’s order of operations:

  1. Extract filters are evaluated.

  2. Data source filters are evaluated.

  3. Context filters are evaluated.

  4. FIXED LOD expressions are evaluated.

  5. INCLUDE LOD expressions are evaluated.

  6. EXCLUDE LOD expressions are evaluated.

  7. Dimension filters are evaluated.

  8. Measure filters are evaluated.

  9. Table calculations are evaluated.

This order matters because data source and context filters can reduce rows before expensive LOD expressions are evaluated, while dimension filters run only after FIXED, INCLUDE, and EXCLUDE LOD expressions. Table calculations run last and may repeatedly process a large result set.

Common investigation areas include:

  • Filters: Check for unnecessary filters, broad filter scopes, or filters affecting many worksheets.

  • LOD expressions: Confirm that expensive FIXED, INCLUDE, or EXCLUDE expressions are required.

  • Table calculations: Look for calculations using functions such as LOOKUP or WINDOW over large partitions.

  • Data relationships: Review whether unnecessary joins or relationship complexity increase query cost.

  • Visualization design: Test whether excessive marks, excessive levels of detail, or dashboard actions create slow rendering.

Best Practices and Product Scope

  • Reproduce the issue using representative data volume and realistic user actions.

  • Record the smallest useful session so relevant timings remain easy to identify.

  • Compare the recorded interaction with a simplified version of the worksheet.

  • Prefer an extract for large historical datasets when near-real-time data is unnecessary; use a live connection when current data is required.

  • Reduce unnecessary fields, marks, filters, and repeated table calculations before fine-tuning optimization.

  • Treat the recording as one diagnostic input alongside Performance Advisor findings, server logs, and repository or platform monitoring.

  • Performance Recorder is a Tableau Desktop troubleshooting tool. It is not a Tableau Prep authoring feature or a general Tableau Server or Tableau Cloud monitoring service; those deployments require their respective logs and administrative diagnostics.

50

Why do excessive Tableau dashboard filters reduce performance?

Excessive dashboard filtering can reduce performance because a filter change can make Tableau rerun several worksheet queries and recalculate expensive fields or LOD expressions. Filter scope, filter complexity, and filter order determine the actual cost; the number of filter controls by itself is not the whole story.

Read full answer

Applies toTableau Desktop, Tableau Cloud, and Tableau Server (current releases); Tableau Prep (current release) for preprocessing filters

How Filter Performance Works

Tableau evaluates filters at different stages, each with a different cost:

  • Data source filters: Restrict rows before worksheet processing. When the predicate is pushdown-eligible, the database can perform the filtering efficiently.

  • Context filters: Run before ordinary dimension filters. A highly selective context filter can improve performance, but context filters can also force Tableau to create larger intermediate result sets.

  • Dimension filters: Remove rows at the row level. Applying one filter to several worksheets causes each affected worksheet to perform its own query and calculation.

  • Measure filters: Evaluate aggregated values, so the database cannot always perform all associated work through simple row-level pushdown.

  • Table calculation filters: Run after aggregation and therefore cannot reduce the source rows Tableau must initially process.

A filter shared across many worksheets therefore increases the total worksheet-level work, but Tableau does not normally execute one separate query for every filter control.

Common Causes of Slowdown

  • Broad dashboard scope: A filter using “All using this data source” affects every applicable worksheet, unlike a filter targeting selected worksheets.

  • Expensive calculated fields: A filter based on a complex or nested calculated field may prevent efficient pushdown and require Tableau to evaluate the expression.

  • LOD expressions: FIXED, INCLUDE, and EXCLUDE calculations can introduce intermediate aggregations whose cost depends on the dimensions in scope and applicable filters.

  • Extracts and caching: Extract filters can make an extract smaller and reduce refresh time. Dashboard and ordinary data-source filters do not shrink an existing extract; they change the results queried from it.

  • Multiple worksheet queries: On a live connection, changing a shared filter can trigger several database queries concurrently, each with its own aggregation work.

  • Additional dependencies: Dashboard actions, hidden source worksheets, and filters applied broadly can extend processing beyond what is immediately visible.

Order of Operations

For an extract-backed workbook, Tableau’s relevant processing sequence is:

  1. Extract filters

  2. Data source filters

  3. Context filters

  4. FIXED LOD expressions

  5. Dimension filters

  6. Measure filters

  7. Table calculations

A FIXED LOD expression ignores ordinary dimension filters unless the relevant dimensions are included in context. INCLUDE and EXCLUDE expressions are affected by applicable dimension filters, so adding or changing a dimension filter may cause their results to be recalculated.

Context filters change this sequence by moving selected conditions ahead of dimension filters and FIXED LOD evaluation. They are therefore not automatically faster and should be introduced only after testing.

Business Example

Suppose a sales dashboard contains these records:

Region Category Sales Profit
North Furniture 10,000 1,200
North Supplies 4,000 300
South Furniture 8,000 700
South Supplies 5,000 450

The dashboard filters Region to North and Category to Supplies.

Expected result: only the North–Supplies row remains, with sales of 4,000 and profit of 300.

If these filters affect twelve worksheets containing expensive aggregations and LOD expressions, Tableau must generate and calculate a result for each affected worksheet. Pushing the restrictions to the database or Tableau Prep can reduce the rows processed, provided the source supports efficient filtering.

Performance Best Practices

  • Limit filter scope: Target only the worksheets that need a filter; use “All using this data source” only when every worksheet requires it.

  • Remove permanent restrictions early: Apply extract filters in Tableau Desktop or row-level filters in Tableau Prep before publishing the data.

  • Use context filters selectively: Add one when it is highly selective or has been shown by performance testing to improve the workload.

  • Keep filter calculations simple: Move expensive aggregation or transformation logic into the database or Tableau Prep where practical.

  • Review LOD design: Use the simplest LOD expression that meets the requirement and test how its results change with filters.

  • Optimize the source and extract: Create suitable database indexes for frequent filters and remove unused fields from extracts.

  • Reduce hidden dependencies: Remove unused worksheets, narrow dashboard actions, and consolidate redundant filters.

  • Test realistic interactions: Measure production-like filter combinations in Tableau Desktop’s Performance View and identify the slowest worksheet queries.

51

What is the difference between .twb and .twbx files in Tableau?

A .twb file is an unpackaged Tableau workbook: an XML file containing worksheets, dashboards, calculated fields, parameters and data-source definitions. A .twbx file is a packaged workbook: a ZIP-based archive containing the .twb plus referenced local files or extracts and other required assets.

Read full answer

Applies toTableau Desktop, Tableau Prep, Tableau Server, and Tableau Cloud (current releases)

What Each Format Contains

.twb .twbx
Format XML text file Compressed archive based on ZIP
Workbook definitions Yes Yes, inside the archive
Local data or extracts Not embedded; referenced separately Included when the workbook is packaged
Connection information Yes Yes, inside the packaged workbook
Version control The XML can be reviewed directly in Git The archive generally must be unpacked before meaningful comparison
Editing Requires Tableau Desktop and access to referenced data Can be edited in Tableau Desktop with its packaged data
Sharing Local files must also be transferred or remain accessible Suitable for sharing the workbook and local data as one file

Related formats include .tds and .tdsx for standalone data sources, .hyper for Tableau extracts, and .tfl or .tflx for Tableau Prep flows and packaged flows. The older .twm packaged-workbook format is obsolete.

How Data Is Referenced

An unpackaged .twb normally stores the location of its data rather than the data itself. A local-file connection might reference C:\Data\orders.csv, while a database connection stores the server and database details.

When Tableau creates a .twbx, it includes supported referenced local files and/or extracts and adjusts the workbook connection so it can resolve the packaged data. Server data from a live SQL Server, Tableau Server, or Tableau Cloud connection is not embedded in the package. A published live connection continues to access the server data after publication.

Saving and Packaging

  1. Build the workbook in Tableau Desktop.

  2. Select File > Save As....

  3. Choose Tableau Workbook (*.twb) for an unpackaged workbook or Tableau Packaged Workbook (*.twbx) for a portable package.

  4. To inspect a .twbx, copy it, change the extension to .zip, and extract it. The archive contains the .twb and its packaged assets or data.

If an unpackaged workbook uses a Tableau extract, Tableau stores the .hyper file separately from the .twb; both must be kept together and the relative paths must remain valid.

Business Example

A sales manager creates a Tableau calculated field:

IF [Sales] > 1000 THEN "Key Account" ELSE "Standard" END

Region Sales Order ID Classification
West 1,450 101 Key Account
East 320 102 Standard
North 2,100 103 Key Account
  • As a .twb, the workbook contains the calculation and a reference to orders.csv. The recipient needs the CSV at the expected path or a valid alternative connection.

  • As a .twbx, the archive contains the workbook and orders.csv. The recipient can open the package and see the dashboard with its packaged data.

Best Practices and Pitfalls

  • Choose the appropriate size strategy: For large local datasets, an extract can improve performance and may reduce package size, but compare the extract and source before packaging. Use Data > Extract to create an extract.

  • Version-control the .twb: Its XML is easier to review than a packaged archive. Keep generated .twbx files out of version control unless the repository is intended to store those binary artifacts.

  • Do not treat .twbx as live-data hosting: It transports local files and extracts; it does not replace publishing a live connection to Tableau Server or Tableau Cloud.

  • Expect authentication to be required: Database credentials are not reliably portable with a workbook, so another user may need to authenticate again.

  • Use the appropriate Tableau component: Tableau Desktop is the primary workbook-authoring application; Tableau Prep prepares upstream data; Tableau Server and Tableau Cloud publish and host dashboards for browser-based viewing.

52

What is Tableau Pulse in Tableau Cloud?

Tableau Pulse is a Tableau Cloud service that proactively monitors business metrics and delivers personalized, plain-language updates to subscribers. It highlights changes in key performance indicators so recipients can understand what changed and investigate unusual results without manually checking every dashboard.

Read full answer

Applies toTableau Cloud (current release); Tableau Desktop and Tableau Prep (current releases) for publishing data sources

Core Capabilities

Tableau Pulse focuses on important metrics rather than reproducing a complete dashboard.

  • Metric monitoring: Tracks measures such as sales, profit, conversion rate, support volume, or customer growth.

  • Personalized updates: Subscribers receive information relevant to the metric’s configured segment, such as a region, product line, or account.

  • Change detection: Highlights movement against a comparable period and, when configured, against a target.

  • Plain-language summaries: Describes what changed and provides context for follow-up analysis.

  • Proactive delivery: Makes updates available in Tableau Cloud, by email, and through the Tableau app for Slack when those channels are configured.

  • Follow-up questions: Ask Pulse, where available, lets subscribers ask natural-language questions about the metric and its changes, subject to their permissions and the available data context.

  • Investigation: An update can lead subscribers to the metric details or underlying Tableau content for deeper analysis.

Generated summaries may surface patterns or potential contributing factors, but an AI-generated explanation should not be treated as proof of causation.

Creating and Using a Pulse Metric

  1. Publish the data

  2. In Tableau Desktop, select Server > Tableau Cloud > Publish Data Source.

  3. In Tableau Prep Builder, save the flow with File > Save As > To Tableau Cloud. To publish the prepared data as a Tableau Cloud data source, configure and run an output through Tableau Prep Conductor; saving the flow alone does not publish its output.

  4. Prefer a clean, governed data source with documented measures and a consistent reporting grain.

  5. Create the metric

  6. In Tableau Cloud, select Pulse from the navigation bar and then select Create metric.

  7. Choose the published Tableau Cloud data source.

  8. Define the calculation

  9. Select the measure, for example SUM(Sales).

  10. Choose the time field, such as Order Date, and the time granularity, such as month.

  11. Add segment filters, such as Region = East.

  12. Choose the comparison behavior, such as comparison with the previous period, and set a target value when required.

  13. Save and distribute the definition

  14. Give the metric a recognizable business name, such as “East Monthly Sales.”

  15. Save it, publish it when ready, and allow subscribers to follow it.

  16. Receive and investigate updates

  17. Choose the relevant email or Slack delivery and notification preferences after the required site integrations are configured.

  18. Review the reported value, change from the comparison period, target status, and any summarized drivers.

  19. Open the metric details, use Ask Pulse, or investigate the underlying Tableau view.

Metric freshness depends on the published source. For an extract-based source, its Tableau Cloud refresh schedule determines how quickly Pulse can observe new data.

Business Example

Assume the published Orders data source contains:

Order Date Region Sales
2025-01-01 East $100
2025-02-01 East $120
2025-03-01 East $150

Create East Monthly Sales using:

  • Measure: SUM(Sales)

  • Time field: Order Date

  • Time granularity: Month

  • Segment: Region = East

  • Target: $140

After the March data is available, the expected Pulse update is:

  • Current value: $150

  • Change from February: 25%

  • Difference from target: $10

  • Target variance: 7.1% above target

A corresponding summary might state that East monthly sales reached $150, increased 25% from February, and exceeded the $140 target.

Role Across the Tableau Platform

  • Tableau Desktop: Authors dashboards and detailed analysis that subscribers can use for investigation.

  • Tableau Prep: Cleans and shapes data and publishes governed outputs for Tableau Cloud.

  • Tableau Cloud: Hosts data sources, Pulse metrics, subscriber preferences, and related Tableau content.

  • Tableau Server: Publishes and serves traditional Tableau content but does not provide the Tableau Pulse metric-monitoring service.

Pulse is complementary to dashboards: dashboards support detailed exploration, while Pulse answers the earlier question of “What changed, and does it matter?”

Best Practices and Limitations

  • Model data upstream: Use a star schema, documented relationships, consistent date fields, and a clearly defined row grain in Prep or Desktop.

  • Keep definitions simple: Prefer straightforward aggregate measures. Validate complex LOD expressions or table calculations in Tableau before using them in metric definitions.

  • Remember filter semantics: { FIXED ... } LOD expressions are evaluated before ordinary dimension filters. Pulse segmentation is not a substitute for Tableau context filters, so compare Pulse values with validated dashboard values.

  • Control refresh timing: Restrict metrics to complete reporting periods when comparing months or quarters; partial periods can produce misleading changes.

  • Separate metrics: Create distinct Pulse metrics for distinct business questions rather than combining several measures into one update.

  • Design for action: Use consistent metric names, units, time periods, and targets so subscribers can interpret notifications without extra documentation.

  • Validate drivers: Use Pulse to identify where to investigate, then confirm the explanation through the source data and related Tableau content.

53

How do Tableau and Power BI compare for BI?

Tableau and Power BI are both self-service BI platforms for connecting data, modelling relationships, calculating metrics, and publishing interactive reports. Tableau emphasizes visual exploration and highly customizable analytics, while Power BI integrates more tightly with Microsoft Excel, Azure, and Microsoft Fabric.

Read full answer

Applies toTableau Desktop, Prep, Server, and Cloud (current releases); Microsoft Power BI Desktop, Power BI Service, and Microsoft Fabric (current releases)

Core Differences

Area Tableau Power BI
Desktop platform Windows and macOS Windows
Data preparation Tableau Prep with visual profiling and transformations Power Query in Power BI Desktop; Fabric Dataflows for managed workflows
Data modelling Logical and physical relationships; joins and extracts Relationships, measures, calculated columns, hierarchies, and star schemas
Calculated analytics Calculated fields, LOD expressions, and table calculations DAX measures, calculated columns, calculated tables, and calculation groups
Data storage Live connections or compressed Hyper extracts Import model, DirectQuery, or a combination through composite models
Publishing Tableau Server or Tableau Cloud Power BI Service through Microsoft Fabric workspaces
Microsoft integration Connectors and APIs for Microsoft services Native integration with Excel, Teams, Azure, Purview, and Fabric
Governance Server/Cloud catalog, permissions, SSO, and row-level security Fabric workspaces, semantic models, deployment pipelines, RLS, OLS, and sensitivity labels
Best fit Visual analysis, ad hoc exploration, and specialist analytics teams Broad reporting adoption, Microsoft-centric estates, and centralized enterprise BI

Both products support many data sources, scheduled refreshes, subscriptions, mobile viewing, SSO, and row-level security. Licensing, deployment cost, connector requirements, and administration effort should be evaluated rather than assuming one platform is universally cheaper.

Data Connections and Modelling

Tableau offers two principal access patterns:

  • Live connection: Tableau queries the source database, providing fresh data but depending on source performance.

  • Extract: Tableau stores an accelerated snapshot, normally using the Hyper engine. Extracts are often faster for large analytical datasets and can be refreshed incrementally.

Relationships can be defined logically or physically in Tableau. Tableau Prep is used for cleaning, joining, pivoting, aggregating, and publishing flows to Tableau Server or Cloud.

Power BI uses:

  • Import: Data is evaluated and stored in the Power BI semantic model, supporting fast interactive reports.

  • DirectQuery: Queries are sent to supported relational or analytical sources, subject to source latency and query limits.

  • Composite models: Some tables are imported while others remain in DirectQuery.

Power BI normally performs best with a star schema: a fact table containing measures and foreign keys, plus related dimension tables. DAX measures are preferred over calculated columns because they are evaluated within the current filter context and usually consume less storage.

Calculated Analysis Example

Suppose the sales data is:

Region Sales Amount
East 200
North 100
South 150
West 50
Total 500

The business requirement is to show each region’s percentage of total sales.

In Tableau, create a calculated field named Region Share:

SUM([Sales Amount]) / { FIXED : SUM([Sales Amount]) }

To create it, connect the data, select the source in the Data pane, right-click the data source, choose Create Calculated Field, and enter the formula. Place Region on Rows, SUM(Sales Amount) on Columns, and add Region Share to Text. The displayed percentages are 40%, 20%, 30%, and 10%.

In Power BI, model FactSales and DimRegion as a star schema and create this measure:

Region Share = DIVIDE(SUM(FactSales[Sales Amount]), CALCULATE(SUM(FactSales[Sales Amount]), REMOVEFILTERS(FactSales, DimRegion)))

Format the measure as a percentage and add it to a table or clustered column chart.

The calculation contexts differ. A Tableau FIXED LOD is evaluated before table calculations and ignores normal dimension filters unless those filters are added as context filters. A Power BI measure responds to the current filter context; REMOVEFILTERS explicitly removes filters from the listed tables. Additional filtered dimensions should also be included in REMOVEFILTERS when the denominator must represent a complete business total.

Publishing and Collaboration

Tableau Server is a self-managed deployment for organizations requiring direct control over infrastructure, authentication, and extract files. Tableau Cloud provides a hosted service and simplifies operations, although data residency, networking, and security policies may constrain deployment.

Power BI Service, managed through Fabric workspaces, is the publishing environment for Power BI reports and semantic models. It offers native sharing through Microsoft 365, gateway-managed on-premises connectivity, and integration with Fabric data workflows, security, and governance.

Both platforms support report subscriptions, data-driven alerts, embedded analytics, and reusable data models. Power BI usually has an advantage when users already work primarily in Excel and Teams; Tableau often provides a more cohesive specialist visual-analytics environment.

Performance and Design

Tableau best practices:

  • Use extracts for frequently accessed large datasets when near-real-time data is unnecessary.

  • Aggregate before Tableau when possible and limit high-cardinality strings and distinct counts.

  • Minimize nested table calculations and large numbers of context filters.

  • Test important workbooks with Tableau’s performance recording tools.

Power BI best practices:

  • Prefer Import models for most interactive reports and use DirectQuery only when fresh data or source-level scale requires it.

  • Apply star-schema modelling, use single-direction relationships, and avoid unnecessary bidirectional relationships.

  • Optimize source indexes and partitions, and review expensive DAX measures with Performance Analyzer.

  • Use calculation groups and shared measures to avoid duplicated logic.

For visual design, both tools should use consistent colours, meaningful labels, restrained interactions, and filters placed where users expect them. Neither platform compensates for an unclear metric definition, poor source modelling, or overcomplicated dashboards.

Choosing Between Them

Choose Tableau when visual exploration, flexible dashboard design, heterogeneous data sources, or a specialist analytics workflow is central. Choose Power BI when Microsoft 365 and Fabric integration, broad internal adoption, and centralized lifecycle management are priorities.

A practical evaluation should use the same representative dataset and report requirements, then compare authoring effort, refresh behaviour, dashboard usability, security, licensing, and measured query performance. The better platform is usually the one that fits the organization’s data ecosystem and operating model—not the one with the longer feature list.

54

How do you connect Tableau to Python or R analytics?

Tableau connects to Python through TabPy and to R through Rserve. The external analytics service runs on a separate host, while Tableau invokes an exposed function from a calculated field or uses it in a Prep Script step.

Read full answer

Applies toTableau Desktop, Tableau Prep, Tableau Server, and Tableau Cloud (current release); TabPy 2.x; Rserve 1.8-11

How the Connections Work

  • Python with TabPy: Start a TabPy server, register its URL in Tableau, and call a deployed Python function from a calculated field.

  • R with Rserve: Start an Rserve server, make the required R function available in its environment, register the server in Tableau, and call the function from a calculated field.

  • Tableau Desktop: Open Analysis > Manage Analytics Extensions on Windows or Tableau > Manage Analytics Extensions on macOS, select TabPy or Rserve, enter the server details, and test the connection.

  • Tableau Prep: Add a Script step, select the configured TabPy or Rserve connection, choose the exposed function, and map its arguments to input fields.

  • Tableau Server: An administrator installs the service on a host accessible to Tableau Server, configures it in Analytics Extensions Settings, and associates it with the relevant site.

  • Tableau Cloud: A site administrator registers the external service in the site’s analytics-extension settings. Tableau Cloud can connect to TabPy or Rserve but cannot host that analytics-extension service itself.

Business Example

Suppose the order data is:

Order ID Order Value Region
1 1200 East
2 450 West
3 800 East

The rule classifies values of 1000 or more as High and all other values as Standard.

Revenue Band Order Count
High 1
Standard 2

The external function returns a string, so Tableau treats the calculated field as a dimension. It can be placed on Rows or Columns, while COUNTD([Order ID]) supplies the order count.

Filters, LOD Expressions, and Order of Operations

An external function used in a calculated field does not replace Tableau’s normal calculation order:

  1. Extract and data-source filters are applied.

  2. Context filters are applied.

  3. FIXED LOD expressions are evaluated.

  4. INCLUDE and EXCLUDE LOD expressions are evaluated.

  5. Dimension filters are applied.

  6. Table calculations run last.

For example:

{ FIXED [Region] : SUM([Sales]) }

A normal dimension filter on Region is applied after the FIXED expression, so the fixed result can still include rows removed by that later filter. Use a context filter or an appropriate FIXED LOD when the calculation must precede ordinary dimension filtering.

Code Example

Install and start TabPy in one terminal:

python -m pip install "tabpy>=2,<3"
tabpy

Save the following as tabpy_revenue.py:

from tabpy.tabpy_toolkit import UserDefinedFunction


@UserDefinedFunction
def revenue_band(order_value):
    if order_value >= 1000:
        return "High"
    return "Standard"

With TabPy running, deploy the function from a second terminal:

tabpy_deploy tabpy_revenue.py

Create the Tableau calculated field:

TABPY_REVENUE_BAND([Order Value])

For R, install Rserve, define the function, and start the server:

install.packages("Rserve", repos = "https://cloud.r-project.org")

revenue_band <- function(order_value) {
  if (order_value >= 1000) {
    "High"
  } else {
    "Standard"
  }
}

Rserve::run.Rserve(args = "--no-save")

Create the Tableau calculated field:

R_SERVE("revenue_band", [Order Value])

Best Practices and Pitfalls

  • Prefer native Tableau calculations when the logic is simple; external calls add network and processing overhead.

  • Precompute complex transformations in the source or Tableau Prep when they do not need to respond interactively to marks or filters.

  • Use extracts to improve source-data access, but remember that extracts do not remove runtime external-function calls.

  • Keep external scripts row-level where possible and aggregate explicitly in Tableau unless aggregation inside the script is intentional.

  • Deploy TabPy and Rserve as managed, version-controlled services rather than relying on individual workstations.

  • Restrict network access, use TLS through a supported secure proxy or hosting layer, and never expose an unprotected endpoint publicly.

  • Test with representative volumes because payload size, null handling, and returned data types can materially affect performance.

55

How can Tableau dashboards be embedded in web pages?

Tableau Embedding API v3 is the recommended way to embed a published Tableau Cloud or Tableau Server dashboard in a website. It provides responsive sizing, interactive controls, events, and enterprise authentication options; a standard HTML iframe is a simpler alternative.

Read full answer

Applies toTableau Cloud and Tableau Server (current release), Tableau Desktop and Tableau Prep (current release), and Tableau Embedding API v3 (latest v3 release)

Publishing Workflow

  1. Connect and prepare the data in Tableau Desktop.

  2. Use Tableau Prep for additional cleansing and data modelling.

  3. Choose a live connection for current data or an extract for faster dashboard performance. A published extract is stored in Tableau Cloud or Tableau Server, not in the viewer’s browser.

  4. Create the dashboard and set its dimensions using Format > Size.

  5. Add filters, parameters, and actions. Right-click a filter card and select Show Filter when users need it.

  6. Select Server > Publish to Tableau Cloud or Server > Publish to Tableau Server.

  7. Grant users View permission on the published workbook. If users also need direct access to the underlying data source, grant the corresponding data-source permissions separately.

  8. Copy the published dashboard URL from the browser. A typical URL is:

https://YOUR-TABLEAU-HOST/views/WorkbookName/DashboardName?:showVizHome=no

The ?:showVizHome=no parameter hides the Tableau home button; it does not provide data security.

Embedding Options

Method Best use Trade-off
Tableau Embedding API v3 Production integrations requiring responsive design, filters, events, or integrated authentication Requires JavaScript configuration and administrator enablement
HTML iframe Simple website integration with an interactive Tableau view Offers fewer host-page controls and event integration

Tableau Public dashboards can be embedded using the same methods, but their published data and workbooks remain public. A local .twb or .twbx file cannot be embedded directly in a webpage; publish it to Tableau Cloud or Tableau Server first.

Code Example

Replace the host, workbook, and dashboard names with the values from the published dashboard URL.

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Sales Dashboard</title>

  <!-- Load the current Tableau Embedding API v3 before using TableauViz. -->
  <script src="https://public.tableau.com/javascripts/api/tableau.embedding.3.latest.min.js"></script>
</head>
<body>
  <main id="sales-dashboard"></main>

  <script>
    const dashboardUrl =
      "https://YOUR-TABLEAU-HOST/views/SalesDashboard/Sales?:showVizHome=no";

    const viz = new TableauViz({
      src: dashboardUrl,
      width: "100%",
      height: "700px",
      toolbar: "bottom"
    });

    document
      .getElementById("sales-dashboard")
      .appendChild(viz.getElement());
  </script>
</body>
</html>

For a simpler embedding, use an interactive iframe:

<iframe
  title="Sales Dashboard"
  src="https://YOUR-TABLEAU-HOST/views/SalesDashboard/Sales?:showVizHome=no"
  width="100%"
  height="700"
  style="border: 0;"
  allowfullscreen>
</iframe>

Authentication and Access

  • Published-view authentication: The iframe or Embedding API loads the Tableau view, and Tableau authenticates the user in the browser.

  • Connected Apps: Direct trust supports interactive sign-in from the embedding application and is available for Tableau Cloud and Tableau Server.

  • JWT authentication: Tableau Server can use short-lived JWTs for embedded authentication. A trusted backend signs the token and passes it to the embedding application; Tableau Cloud does not use Tableau Server JWT authentication.

  • Keep secrets off the client: Never place a Connected Apps client secret, Tableau password, or JWT signing key in HTML or browser JavaScript.

  • Apply least privilege: Embedding does not bypass Tableau permissions; users must still have access to the published view.

  • Account for third-party-cookie restrictions when browser sessions cross unrelated domains.

Business Example

Suppose an online sales dashboard uses Region as a dimension and SUM(Sales) as a measure.

Region Sales
North 450,000
South 320,000
East 380,000
West 250,000
Total 1,400,000

The embedded dashboard should display a KPI showing $1,400,000, regional bars, and a filter for year or product category. Filtering to the North region should show $450,000.

Best Practices and Pitfalls

  • Have a Tableau administrator verify that Tableau Embedding API v3 is enabled or permitted for the site.

  • Prefer published extracts for frequently accessed dashboards when data-freshness requirements allow, and configure scheduled extract refreshes.

  • Avoid excessive dashboard actions, high-cardinality filters, and worksheets that scan large datasets.

  • Use a responsive container with a sensible minimum height so labels remain readable.

  • Limit visible filters to those business users understand and need.

  • Configure the site’s Content Security Policy to permit the Tableau Embedding API script and the framed Tableau origin.

  • Test with the exact published URL and in every browser used by the business. A valid embed URL does not bypass missing view or data-source permissions.

56

How do I calculate each customer's first order date with FIXED LOD?

A FIXED level-of-detail (LOD) expression calculates the minimum order date for each customer while preserving the original order-level rows. The expression repeats that customer’s first order date across their orders in the evaluated data.

Read full answer

Applies toTableau Desktop (current release), Tableau Cloud (current release), and Tableau Server (current release) for published workbooks

How FIXED LOD Works

  • [Customer ID] identifies the customer.

  • FIXED calculates one value for every distinct customer.

  • MIN([Order Date]) returns the earliest order date within each customer’s records.

  • The LOD result is available at the row level and repeats for every order belonging to that customer.

If the date field contains both dates and times, MIN([Order Date]) returns the earliest date-time value. Format the calculated field as a date if only the calendar date is required.

Example with Sample Data

Suppose the Orders data contains:

Customer ID Customer Name Order Date
1001 Acme Ltd 2025-01-10
1001 Acme Ltd 2025-03-05
1002 Bright Co 2025-02-12
1002 Bright Co 2025-02-20

After adding First Order Date to the view:

Customer ID Order Date First Order Date
1001 2025-01-10 2025-01-10
1001 2025-03-05 2025-01-10
1002 2025-02-12 2025-02-12
1002 2025-02-20 2025-02-12

The expected customer-level result is:

Customer ID First Order Date
1001 2025-01-10
1002 2025-02-12

Order of Operations

Tableau evaluates calculations in this order:

  1. Extract filters

  2. Data-source filters

  3. Context filters

  4. FIXED LOD expressions

  5. INCLUDE LOD expressions

  6. EXCLUDE LOD expressions

  7. Regular dimension filters

  8. Measure filters

  9. Table calculations

Consequently, a normal dimension filter on [Order Date] or [Customer ID] is applied after the FIXED expression and generally does not change the calculated first order date. To make a customer or date filter affect the LOD calculation, add the relevant field to the Filters shelf and choose Add to Context. Context filters are evaluated before FIXED LOD expressions.

Code Example

Create a calculated field named First Order Date with this formula:

// Repeat each customer's earliest order date on every order row.
{ FIXED [Customer ID] : MIN([Order Date]) }

Best Practices and Common Pitfalls

  • Use a stable customer identifier such as [Customer ID]; customer names may be duplicated or renamed.

  • Ensure [Order Date] is stored as a real Tableau date or date-time type rather than text.

  • Use FIXED when the result must remain associated with individual order rows.

  • If only one row per customer is required, place [Customer ID] and MIN([Order Date]) in the view instead of using the row-level calculated field.

  • Avoid using a table calculation to identify the first order. Table calculations depend on the current view and can produce misleading results when the view is sorted, filtered, or restructured.

  • Format the result as a date in the view and label it clearly to show that it represents the customer’s first order date.

  • Tableau Prep does not support FIXED LOD expressions. Create the calculation in Tableau Desktop or Tableau Cloud, then publish the workbook to Tableau Server or Tableau Cloud when required.

57

How do you group customers by value in Tableau?

Create an aggregate calculated field that compares each customer’s total sales with defined business thresholds. The calculated field produces a discrete customer value tier containing High, Medium, or Low.

Read full answer

Applies toTableau Desktop, Tableau Server, and Tableau Cloud (current releases)

Business Rules

For this example, customers are grouped using total sales:

  • High: total sales greater than or equal to $10,000

  • Medium: total sales from $5,000 to less than $10,000

  • Low: total sales below $5,000

The boundaries are inclusive of the lower threshold, so exactly $5,000 is classified as Medium.

How to Create the Calculated Field

  1. Open the workbook connected to the customer and sales data.

  2. In the Data pane, right-click the numeric Sales field and select Create > Calculated Field.

  3. Name the field Customer Value Tier.

  4. Enter the calculated-field formula and click OK.

  5. Place Customer ID on Rows, SUM([Sales]) on Columns, and [Customer Value Tier] on Color.

  6. To display one row per customer, use Customer ID as the identifying dimension rather than relying only on the customer’s name.

The formula aggregates sales before comparing the result with the thresholds. It works correctly when several source rows exist for each customer.

Sample Data and Expected Result

Customer ID Customer Sales Rows Total Sales Expected Tier
C001 Olivia $7,200 + $4,800 $12,000 High
C002 Liam $8,500 $8,500 Medium
C003 Emma $5,000 $5,000 Medium
C004 Noah $4,999 $4,999 Low

The calculated field returns the tier in the final column for every customer in the view.

Code Example

The basic calculated field is:

IF SUM([Sales]) >= 10000 THEN "High"
ELSEIF SUM([Sales]) >= 5000 THEN "Medium"
ELSE "Low"
END

For reusable business thresholds, create two integer parameters named High Threshold and Medium Threshold. In Tableau Desktop, right-click a numeric field in the Data pane, select Create > Parameter, set the data type to Integer, and configure the default values as 10000 and 5000 respectively. Then use:

IF SUM([Sales]) >= [High Threshold] THEN "High"
ELSEIF SUM([Sales]) >= [Medium Threshold] THEN "Medium"
ELSE "Low"
END

Filters and Order of Operations

  • Ordinary dimension filters, such as a Region filter, are applied before the aggregate calculation and can therefore change SUM([Sales]).

  • A filter placed directly on [Customer Value Tier] is applied after the tier is calculated; it only hides tiers and does not recalculate them.

  • Context filters are evaluated earlier and affect aggregate calculations.

  • The basic formula contains no LOD expression or table calculation, so no additional table-calculation ordering is required.

If each tier must ignore ordinary dimension filters while using all customer rows available after extract, data source, and context filters, use a FIXED LOD expression:

IF { FIXED [Customer ID] : SUM([Sales]) } >= [High Threshold] THEN "High"
ELSEIF { FIXED [Customer ID] : SUM([Sales]) } >= [Medium Threshold] THEN "Medium"
ELSE "Low"
END

Tableau evaluates FIXED after ordinary dimension filters in its order of operations, but the LOD ignores those ordinary filters. Extract filters, data source filters, and context filters are evaluated earlier and can therefore affect the fixed customer total. A filter on the tier itself only filters the resulting output.

Best Practices

  • Model correctly: Join the sales fact table to a customer dimension through Customer ID. Avoid joins that duplicate sales records and inflate customer totals.

  • Manage thresholds centrally: Parameters let authorized users explore scenarios without editing calculations. Ensure High Threshold is always greater than Medium Threshold.

  • Optimize large datasets: If tier definitions are governed centrally, aggregate customer totals in Tableau Prep and publish the prepared data as a Hyper extract. Otherwise, use extracts where appropriate and avoid unnecessary row-level detail.

  • Publish consistently: The calculated field is stored in the workbook when publishing to Tableau Server or Tableau Cloud. Live connections calculate it against the current source, while extracts calculate it against the extracted data.

  • Design clearly: Use an ordered discrete color palette, manually order the legend as High, Medium, Low, and include the thresholds in the dashboard title or subtitle for interpretability.

58

How do you troubleshoot Tableau dashboard totals that differ from the database?

Dashboard reconciliation is the process of confirming that a Tableau total uses the same data grain, filters, aggregation, time boundaries, and currency rules as the database total. Common causes include inconsistent filters, duplicated rows, stale extracts, and calculations evaluated at a different level.

Read full answer

Applies toTableau Desktop, Tableau Prep, Tableau Server, and Tableau Cloud (current releases)

Systematic Troubleshooting Process

  1. Confirm the database expectation

  2. Reproduce the exact database query and use the same records, date boundaries, statuses, tax treatment, currency, and aggregation.

  3. Establish the expected data grain and whether fields such as Order ID are unique at that grain.

  4. Compare rounding and decimal precision because database DECIMAL and Tableau floating-point arithmetic can produce small differences.

  5. Validate the worksheet

  6. Open the affected worksheet and select View Data from its tooltip to inspect the rows contributing to the result.

  7. Compare SUM([Sales Amount]) with the displayed grand total and identify whether the dashboard uses a separate summary worksheet.

  8. Check number formats, null handling, currency conversion, and whether the worksheet and database aggregate at equivalent levels.

  9. Inspect filters and actions

  10. Review extract filters, data-source filters, context filters, worksheet filters, dashboard filters, and filter actions.

  11. On a dashboard, verify that Apply to Worksheets includes every worksheet contributing to the total.

  12. Inspect set actions as well: a set action can replace the source field used by a calculation and therefore change the total.

  13. Verify connection freshness

  14. Compare a live connection with its extract and check the extract’s refresh timestamp.

  15. Refresh a local extract through Data > Refresh and inspect refresh history for Tableau Server and Tableau Cloud data sources.

Filter and Calculation Order

Tableau evaluates operations in this effective order:

  1. Extract filters

  2. Data-source filters

  3. Context filters

  4. FIXED LOD expressions

  5. Dimension filters

  6. Measure filters

  7. INCLUDE and EXCLUDE LOD expressions

  8. Table calculations

  9. A FIXED expression ignores ordinary dimension and measure filters unless the relevant dimensions are added to context.

  10. INCLUDE and EXCLUDE expressions respond to ordinary dimension and measure filters.

  11. Table calculations operate on the rows remaining after filters. Their addressing, partitioning, and sort-order fields determine the result; null handling depends on the table-calculation operation.

Joins and Data Grain

On the Data Source tab in Tableau Desktop, inspect relationships and use Edit Relationship to verify their cardinality and referenced fields. Logical relationships preserve source row grain, including many-to-many relationships; they should not be described as duplicating rows. An uncontrolled many-to-many physical join can duplicate records and inflate totals.

Useful validation calculations are COUNT([Order ID]) and COUNTD([Order ID]). If COUNT is greater than COUNTD, the current result contains repeated IDs, but this indicates duplication only when Order ID is expected to be unique at that worksheet grain. In Tableau Prep, inspect join-step and output row counts and use the Profile pane to identify nulls and unexpected key duplication.

Sample Reconciliation

Suppose the source data is:

Order ID Region Sales Amount
O-100 East 100
O-101 East 50
O-102 West 80

The database total for Region = East is 150.

Tableau calculation Filter Expected result
SUM([Sales Amount]) East 150
COUNT([Order ID]) East 2
COUNTD([Order ID]) East 2

If Tableau shows 300, each East row may have been duplicated by a join. If the worksheet shows 150 but the dashboard shows another value, inspect the summary worksheet, filter scope, set actions, and any table calculation used for the visible total.

Code Example

Create each expression as a separate Tableau calculated field:

// Standard aggregate sales total
SUM([Sales Amount])

// Convert a missing aggregate to zero
IFNULL(SUM([Sales Amount]), 0)

// Region-level total affected by ordinary dimension and measure filters
{ INCLUDE [Region] : SUM([Sales Amount]) }

// Regional total fixed before ordinary dimension filters
{ FIXED [Region] : SUM([Sales Amount]) }

// Compare row counts with distinct order counts
COUNT([Order ID])
COUNTD([Order ID])

Add the relevant region filter to context when the FIXED regional total must reflect that filter.

Performance and Design Best Practices

  • Model at a consistent grain: Use appropriately related order, customer, and product data and avoid uncontrolled many-to-many physical joins.

  • Use context filters deliberately: Context changes FIXED LOD behaviour and can increase computation cost.

  • Prefer simple aggregates: Use table calculations only for ranking, running totals, or partition-specific logic.

  • Optimize extracts: Remove unnecessary history, use incremental refresh where appropriate, and split very large sources when practical.

  • Make totals explicit: Apply consistent filters, aggregation levels, currency conversions, labels, and number formats across dashboard worksheets.

  • Test published behaviour: Verify row-level security and user permissions on Tableau Server or Tableau Cloud because they can change the records available to a user.

59

How can you optimize Tableau dashboards for large data sources?

The fastest Tableau dashboard is usually one that reduces the data processed before rendering: simplify or aggregate the source, choose an appropriate live or extract strategy, optimize calculations, and keep dashboard interactions lightweight. Performance profiling should come first so optimization targets the actual bottleneck.

Read full answer

Applies toTableau Desktop 2025.1, Tableau Prep 2025.1, Tableau Server 2025.1, and Tableau Cloud 2025.1

Diagnose the Bottleneck

Open Performance View from the Tableau Desktop Dashboard menu or toolbar and record interactions such as filters and dashboard actions.

Identify where time is spent:

  • Source query: The database is slow, doing too many joins, or returning excessive rows.

  • Extraction or aggregation: Tableau is processing a large extract or many detailed rows.

  • Calculation: LOD expressions, row-level calculations, or table calculations are expensive.

  • Rendering: Too many marks, oversized worksheets, or complex formatting delay the visual.

  • Interaction: Actions trigger several slow worksheets or recalculate large results.

For Tableau Server, administrators should inspect server logs, refresh jobs, concurrent sessions, and host CPU and memory usage. In Tableau Cloud, review the site’s administrative usage and refresh-job telemetry; the underlying host’s CPU and memory are managed by Tableau.

Optimize the Source

Requirement Recommended approach
Frequently changing data with a responsive source Use a live connection
Large, stable data used by many viewers Use a Hyper extract
Data is much more detailed than the dashboard needs Aggregate it in Tableau Prep
Multiple large tables Use relationships or pre-join in Tableau Prep
Only a recent reporting period is required Apply an extract or datasource filter

In Tableau Prep:

  1. Import the source and remove unused fields.

  2. Create date hierarchies and calculated fields in the Profile pane.

  3. Add an Aggregate step at the dashboard’s required grain, such as Region and Order Month.

  4. Filter to the required reporting period.

  5. Validate that joins do not duplicate rows or change the intended grain.

  6. Publish the prepared data or an extract to Tableau Server or Tableau Cloud.

In Tableau Desktop, set the connection to Extract in the Data Source tab. Configure datasource filters by right-clicking the datasource in the Data pane and selecting Add a Filter. Extract filters applied when creating the extract reduce the stored dataset, whereas worksheet filters generally affect the displayed result.

Prefer a native connector over custom SQL unless the source lacks required functionality. Custom SQL can also prevent Tableau from pushing filters or aggregations into the source.

Optimize Calculations

  • Aggregate early: Perform SUM, COUNT, or AVG in Prep or the datasource when possible.

  • Remove unnecessary detail: Do not send transaction-level rows to a dashboard that displays monthly totals.

  • Simplify calculations: Prefer straightforward expressions and CASE logic over deeply nested IF statements.

  • Use LOD expressions carefully: A calculation such as { FIXED [Region], [Order Month] : SUM([Sales]) } can require substantial processing. Include only the dimensions essential to the result.

  • Limit table calculations: Reduce the number of marks, add appropriate table-calculation partitioning, and avoid calculations that process very large partitions.

  • Push filters into the source: Compatible datasource filters can reduce the rows returned by live connections.

Avoid replacing a source-level aggregation with a table calculation merely to avoid an LOD: table calculations still operate on the marks produced by the view and may remain expensive.

Understand Filter and Calculation Order

Tableau’s effective processing order is:

  1. Extract filters

  2. Datasource filters

  3. Context filters

  4. FIXED LOD expressions

  5. INCLUDE LOD expressions

  6. EXCLUDE LOD expressions

  7. Dimension filters

  8. Measure filters

  9. Table calculations

Consequently, a FIXED LOD normally ignores ordinary dimension and measure filters. To filter the population used by a FIXED calculation, add the relevant filter to context. Use context filters selectively because they can require additional processing.

Parameters do not filter rows directly; they supply values to calculations, filters, and sets. Table calculations run last and therefore respond to dimension filters, which often makes them slow on large views.

Code Example

Suppose a report needs a target-status label at Region and month grain:

Order Month Region Sales Target
2025-01-01 East 120,000 100,000
2025-01-01 West 90,000 100,000
2025-02-01 East 140,000 120,000
2025-02-01 West 110,000 110,000

Create this Tableau calculated field:

// Compares values aggregated at the Region and Order Month level.
IF SUM([Sales]) > SUM([Target]) THEN
    "Above target"
ELSE
    "At or below target"
END

Expected result:

Order Month Region Result
2025-01-01 East Above target
2025-01-01 West At or below target
2025-02-01 East Above target
2025-02-01 West At or below target

Target must be numeric and stored at the same grain as Sales; otherwise, summing repeated targets may produce an incorrect comparison.

Best Practices

  • Test with production-scale data and record performance after each major change.

  • Keep worksheets focused and limit the number of marks, high-cardinality details, and simultaneous dashboard actions.

  • Configure dashboard actions under Dashboard > Actions to update only relevant worksheets.

  • Avoid loading detailed extracts when a smaller aggregate extract can answer the same business question.

  • For Tableau Server and Tableau Cloud, publish extracts for broad concurrency, schedule refreshes outside working hours, and monitor connection and refresh capacity.

  • Keep visual filters and dashboard actions understandable; a faster dashboard that users cannot confidently use is not an effective result.

Sign in to keep reading

You've opened 2 full answers. Sign in to read all 59 Tableau answers, mark what you know and pick up where you left off.

Report a mistake

What's wrong?

All Data Analytics & BI subjects