Skip to content

Practical Tableau Interview Questions

44 questions with answers. Hands-on questions where you write code, a query, a formula or concrete steps.

How to approach these questions

Talk while you work: say your approach first, write the simplest correct version, then improve it and mention edge cases.

Solved — practicalStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
3 questions free Unlock the rest in seconds
01

How do you create a basic bar chart of sales by region?

Save to ▾
Show answer
Connect to the data source, drag Region to Columns and Sales to Rows. Tableau aggregates Sales with SUM and chooses bars. Sort descending using the toolbar sort icon, drag Region to Color for distinct colours if needed, and drag SUM(Sales) to Label to show values. Rename the sheet and add a meaningful title such as Sales by Region, current year.
02

How do you change the default number format of a measure?

Save to ▾
Show answer
Right-click the measure in the Data pane, choose Default Properties, then Number Format, and pick currency, percentage or custom format with decimal places and units such as thousands or millions. For Indian reports, a custom format can show the rupee symbol. Default formatting applies everywhere the field is used, while formatting a pill only affects that one sheet.
03

How do you create a hierarchy and a group from the Data pane?

Save to ▾
Show answer
For a hierarchy, drag Sub-Category onto Category in the Data pane and name it, then drag Product below Sub-Category. For a group, right-click a dimension, choose Create, then Group, select members with Ctrl, and click Group, renaming it. Optionally tick Include Other to bucket remaining members. Both appear as new fields and can be used on any sheet.
04

How do you build a dynamic Top 10 customers chart?

Save to ▾
Show answer
Drag Customer Name to Rows and SUM(Sales) to Columns. Drag Customer Name to Filters, open the Top tab, choose By field, Top 10 by Sales Sum. For a flexible version, create an integer parameter and select it instead of the fixed 10, then show the parameter control. If other filters must apply first, add them to context so Top N works on filtered data.
05

How do you connect Tableau to an Excel file with multiple sheets?

Save to ▾
Show answer
Open Tableau Desktop, choose Microsoft Excel under Connect, select the file, and the sheets appear on the left. Drag the main sheet to the canvas, then drag another sheet next to it to create a relationship and choose matching fields. Use Data Interpreter if the sheet has titles or merged cells. Go to a worksheet to start building views.
06

How do you use pivot in Tableau to reshape monthly columns into rows?

Save to ▾
Show answer
On the data source page, select the month columns such as Jan, Feb and Mar using Ctrl, right-click and choose Pivot. Tableau creates two fields, Pivot Field Names and Pivot Field Values. Rename them to Month and Sales. This converts wide data into long format, which works better for time-series charts and filters. The same is possible in Tableau Prep.
07

How do you set up an incremental extract refresh?

Save to ▾
Show answer
Create an extract from the Data menu, choose Extract Data, and tick Incremental refresh. Select a column whose values always increase, such as Order ID or Load Timestamp. Publish to Server or Cloud and create a schedule for incremental refresh, plus an occasional full refresh. Ensure the source does not update old records, or those changes will be missed.
08

How do you blend sales data with a targets file in Tableau?

Save to ▾
Show answer
Connect to both sources. Build the view with the primary source, for example Region and Month from sales. Switch to the targets source in the Data pane, check the link icon next to Region and Month so they are active linking fields, then drag Target onto the view. Tableau aggregates targets to those fields. Make sure the linking field names and values match exactly.
09

Write a calculation for profit ratio and a profit flag.

Save to ▾
Show answer
Profit Ratio: SUM([Profit]) / SUM([Sales]) Profit Flag: IF SUM([Profit]) > 0 THEN 'Profitable' ELSEIF SUM([Profit]) = 0 THEN 'Break-even' ELSE 'Loss' END Format Profit Ratio as percentage. Both are aggregate, so they work at any view level.
10

How do you calculate the number of days taken to ship an order?

Save to ▾
Show answer
Days to Ship: DATEDIFF('day', [Order Date], [Ship Date]) Late Flag: IF DATEDIFF('day', [Order Date], [Ship Date]) > 4 THEN 'Late' ELSE 'On time' END Use AVG(Days to Ship) per region to compare delivery performance.
11

Extract the first name from a full name field.

Save to ▾
Show answer
Using SPLIT: SPLIT([Customer Name], ' ', 1) Using FIND and LEFT: LEFT([Customer Name], FIND([Customer Name], ' ') - 1) Trim spaces first if data is messy: SPLIT(TRIM([Customer Name]), ' ', 1) SPLIT is simpler, while the second method shows string function skills.
12

Write a calculation for year-to-date sales compared with last year to date.

Save to ▾
Show answer
YTD Sales: IF YEAR([Order Date]) = YEAR(TODAY()) AND [Order Date] <= TODAY() THEN [Sales] END LYTD Sales: IF YEAR([Order Date]) = YEAR(TODAY()) - 1 AND [Order Date] <= DATEADD('year', -1, TODAY()) THEN [Sales] END Growth: (SUM([YTD Sales]) - SUM([LYTD Sales])) / SUM([LYTD Sales])
13

Create age buckets for customers using a calculation.

Save to ▾
Show answer
Age Group: IF [Age] < 18 THEN 'Under 18' ELSEIF [Age] <= 25 THEN '18-25' ELSEIF [Age] <= 35 THEN '26-35' ELSEIF [Age] <= 50 THEN '36-50' ELSE '50+' END To sort buckets correctly, create a sort order calculation or sort manually.
14

How do you calculate the current month and previous month sales in a KPI?

Save to ▾
Show answer
Current Month: IF DATETRUNC('month', [Order Date]) = DATETRUNC('month', TODAY()) THEN [Sales] END Previous Month: IF DATETRUNC('month', [Order Date]) = DATEADD('month', -1, DATETRUNC('month', TODAY())) THEN [Sales] END MoM %: SUM([Current Month]) / SUM([Previous Month]) - 1
15

Write an LOD to find the first order date of each customer.

Save to ▾
Show answer
First Order Date: {FIXED [Customer ID] : MIN([Order Date])} Cohort Year: YEAR({FIXED [Customer ID] : MIN([Order Date])}) Convert Cohort Year to a dimension and place it on Rows with YEAR(Order Date) on Columns to see how each cohort keeps buying over time.
16

How do you calculate each category's percent of total sales using LOD?

Save to ▾
Show answer
Total Sales: {FIXED : SUM([Sales])} Percent of Total: SUM([Sales]) / MIN([Total Sales]) Place Category on Rows and Percent of Total on Columns, formatted as percentage. Add Region to context filters if the total should respect the region selection.
17

Calculate average sales per customer for each region.

Save to ▾
Show answer
Use INCLUDE to compute at customer level inside each region: AVG({INCLUDE [Customer ID] : SUM([Sales])}) Place Region on Rows. Tableau sums sales per customer within each region, then averages those totals. Without INCLUDE, AVG([Sales]) would give average per order line, which answers a different question.
18

Show each state's sales compared with its region's total.

Save to ▾
Show answer
Region Sales: {EXCLUDE [State] : SUM([Sales])} Share of Region: SUM([Sales]) / SUM([Region Sales]) With Region and State in the view, EXCLUDE removes State so each row shows the regional total. Alternatively {FIXED [Region] : SUM([Sales])} works but ignores dimension filters.
19

Count customers by the number of orders they placed.

Save to ▾
Show answer
Orders per Customer: {FIXED [Customer ID] : COUNTD([Order ID])} Convert it to a dimension and discrete, place it on Columns, and put COUNTD([Customer ID]) on Rows. The chart shows how many customers placed 1, 2, 3 or more orders, a common customer frequency analysis.
20

Find customers whose latest order is more than 90 days old.

Save to ▾
Show answer
Last Order: {FIXED [Customer ID] : MAX([Order Date])} Churn Flag: IF DATEDIFF('day', [Last Order], TODAY()) > 90 THEN 'At risk' ELSE 'Active' END Use Churn Flag as a dimension with COUNTD([Customer ID]) to size the at-risk segment, and list customers in a detail sheet for the sales team.
21

Create a running total of sales by month.

Save to ▾
Show answer
Place MONTH(Order Date) continuous on Columns and SUM(Sales) on Rows. Use quick table calc Running Total, or write: RUNNING_SUM(SUM([Sales])) Set Compute Using to Order Date. To restart each year, add YEAR(Order Date) to the view and compute along month only, making year the partition.
22

Calculate month-over-month percentage growth.

Save to ▾
Show answer
MoM Growth: (SUM([Sales]) - LOOKUP(SUM([Sales]), -1)) / ABS(LOOKUP(SUM([Sales]), -1)) Compute along month. The first month returns null because there is no previous value. Format as percentage and colour positive and negative values differently for quick reading.
23

Create a 3-month moving average of sales.

Save to ▾
Show answer
Moving Avg: WINDOW_AVG(SUM([Sales]), -2, 0) This averages the current month and the two previous months. Compute along month. Use a dual axis to show actual sales as bars and the moving average as a line, which smooths seasonal noise for trend analysis.
24

Show each product's rank within its category.

Save to ▾
Show answer
Rank: RANK(SUM([Sales]), 'desc') Place Category and Product on Rows. In Edit Table Calculation choose Specific Dimensions, tick Product only so the rank restarts for each category. Add a filter on the rank calculation, set to at most 5, to show the top five products in every category.
25

Build a Pareto chart showing what share of customers drive 80 percent of sales.

Save to ▾
Show answer
Sort customers by sales descending on Columns. Running share of sales: RUNNING_SUM(SUM([Sales])) / TOTAL(SUM([Sales])) Running share of customers: INDEX() / SIZE() Use a dual axis with bars for sales and a line for running percent, and add a reference line at 0.8.
26

Show only the latest 6 months while running totals start from the first month.

Save to ▾
Show answer
Keep all months in the view. Create: Last N Filter: LAST() < 6 Compute along month and put it on Filters set to True. Because table calc filters apply after the running sum, earlier months are hidden but still counted. A normal date filter would reset the running total.
27

How do you build a line chart showing monthly sales trend?

Save to ▾
Show answer
Drag Order Date to Columns, right-click and choose continuous MONTH. Drag Sales to Rows; Tableau draws a line. Add Category to Color for multiple lines, enable markers from Color options, and add a trend line from the Analytics pane if needed. Format the axis, add a title and tooltip, and check that the latest incomplete month is labelled or excluded.
28

How do you create a scatter plot with clusters?

Save to ▾
Show answer
Drag Sales to Columns and Profit to Rows, then drag Customer Name to Detail so each mark is a customer. Add Region to Color if needed. From the Analytics pane, drag Cluster onto the view; Tableau uses k-means to group customers, and you can set the number of clusters. Save clusters as a group to reuse them in other sheets.
29

How do you build a bullet chart for actual versus target?

Save to ▾
Show answer
Select Sales and Target with a dimension such as Region, then choose bullet graph from Show Me. Tableau puts Sales as bars and Target as a reference line with distribution bands. If the roles are reversed, right-click the axis and choose Swap Reference Line Fields. Add colour for achieved versus missed using a calculation comparing SUM(Sales) with SUM(Target).
30

How do you create a donut chart in Tableau?

Save to ▾
Show answer
Create a pie on the first axis using a measure on Angle and a dimension on Color. Put two copies of MIN(0) on Rows, set the second to circle mark, make it smaller and white, and select Dual Axis with synchronised axes. Place a total label on the inner circle. Use donuts only for two to four segments; bar charts are usually clearer.
31

How do you build a waterfall chart showing profit build-up by sub-category?

Save to ▾
Show answer
Put Sub-Category on Columns and SUM(Profit) on Rows, add a Running Total quick table calc, and change mark type to Gantt Bar. Create a calculation -SUM([Profit]) and put it on Size so each bar extends from the previous total. Colour by profit sign and enable Show Row Grand Totals to display the final bar.
32

How do you create a dynamic KPI card with an up or down indicator?

Save to ▾
Show answer
Create the KPI measure and a comparison calculation, for example growth versus last month. Build an indicator calculation: IF [Growth] > 0 THEN '▲' ELSE '▼' END. Use a text mark showing the value, growth and indicator, and colour the indicator using a calculated field for positive and negative. Remove gridlines and borders and place the sheet in a dashboard container.
33

How do you create a parameter-based Top N filter?

Save to ▾
Show answer
Create an integer parameter Top N with a range 5 to 50 and step 5. Drag Product to Filters, open the Top tab, choose By field, select Top and pick the Top N parameter, by SUM of Sales. Right-click the parameter and Show Parameter. Add region to context if Top N should apply within the selected region.
34

Build a dimension switcher so users choose Region, Category or Segment.

Save to ▾
Show answer
Create a string parameter Dimension Choice with values Region, Category and Segment. Then: Selected Dimension: CASE [Dimension Choice] WHEN 'Region' THEN [Region] WHEN 'Category' THEN [Category] ELSE [Segment] END Put Selected Dimension on Rows and show the parameter control.
35

How do you create a filter action from a map to other sheets?

Save to ▾
Show answer
Go to Dashboard, Actions, Add Action, Filter. Choose the map as source sheet, select the target sheets, set run on Select, and choose what happens when clearing the selection, such as Show all values. Under Filter, choose Selected Fields and map State to State. Test by clicking a state and checking that the bar and trend charts update.
36

How do you use a parameter action to let users click a bar and change a reference line?

Save to ▾
Show answer
Create a float parameter, for example Selected Value. Add a reference line using that parameter. Then go to Dashboard, Actions, Add Action, Change Parameter, choose the source sheet, target parameter Selected Value, and source field SUM(Sales), with aggregation set as needed. Clicking a bar updates the parameter, and the reference line moves to compare other bars with it.
37

How do you implement drill down with set actions?

Save to ▾
Show answer
Create a set on Category. Build a calculation: IF [Category Set] THEN [Sub-Category] ELSE '' END, and place Category and this calculation on Rows. Add a set action on select that assigns values to Category Set and removes them when cleared. Clicking a category expands only its sub-categories, creating an asymmetric drill down that standard hierarchies cannot do.
38

How do you add a date range filter showing the last 12 months?

Save to ▾
Show answer
Drag Order Date to Filters, choose Relative Date, select Months and Last 12 months, optionally anchoring it to a specific date. Right-click the filter and choose Show Filter so users can change it. If data has a lag, anchor to the latest date in data using a parameter. Check the view title to display the active date range.
39

How do you show a dynamic title that reflects the selected filter?

Save to ▾
Show answer
Double-click the sheet title and use Insert to add fields or parameters, for example Sales for <Region> in <Parameters.Year>. For multiple selected values, the title shows All or the value list; for cleaner text, create a calculation that returns the selection or All, using a FIXED or table calc approach. Dynamic titles reduce confusion during presentations.
40

How do you create a sparkline in a KPI table?

Save to ▾
Show answer
Put the KPI dimension on Rows and continuous MONTH(Order Date) with SUM(Sales) on a separate column, choose line marks, and set Independent Axis Ranges for each row via Edit Axis. Remove gridlines, axes, headers and borders, and highlight the last point using a calculation such as IF LAST() = 0 THEN SUM([Sales]) END as a dual axis circle.
41

How do you publish a workbook to Tableau Server or Cloud?

Save to ▾
Show answer
Sign in through Server, Publish Workbook in Desktop. Choose the project, name and description, set permissions or inherit from the project, and decide whether to embed credentials or prompt users for data sources. Choose to show sheets as tabs if needed and include external files for extracts. After publishing, set an extract refresh schedule and verify the views in the browser.
42

How do you improve dashboard performance in Tableau?

Save to ▾
Show answer
Use the performance recorder to find slow queries and rendering. Use extracts with only needed fields and rows, aggregate data, reduce marks and sheets, limit quick filters and relevant values, prefer integer and boolean calculations, avoid heavy custom SQL, use fixed dashboard size for caching, and hide unused fields. Workbook Optimizer in Desktop also suggests improvements based on best practices.
43

How do you create a navigation menu between multiple dashboards?

Save to ▾
Show answer
Add Navigation objects or buttons from the Objects pane, set each to go to a target dashboard, and style them with text or images. Place them in a horizontal container at the top of each dashboard for consistency. Use Go to Sheet actions for drill-through from charts. Hide sheets and use Show Sheets as Tabs off when publishing, so users rely on the custom menu.
44

How would you set up row-level security using a user entitlement table?

Save to ▾
Show answer
Create an entitlement table with Username and Region columns, maintained by the business or IT. Relate or join it to the fact table on Region. Create a calculation USERNAME() = [Username] and add it as a data source filter set to True. Publish the data source with embedded credentials and restrict download permissions. Test with View As or user impersonation for each role.

Frequently asked questions

Why are practical questions important?

Most technical rounds include at least one live task. Practising the exact typing and reasoning makes you calm and fast in the real round.

How should I answer them?

Talk while you work: say your approach first, write the simplest correct version, then improve it and mention edge cases.