Sales Analytics Visualizations in Tableau

Build four analytics visualizations using calculated fields and LOD expressions.

Introduction

30 Second Summary

Every business generates mountains of sales data. The difference between a number-heavy spreadsheet and a clear strategic insight is a well-crafted visualization.

In this project, you will build four sales analytics visualizations in Tableau Public using calculated fields and Level of Detail (LOD) expressions. You'll go beyond basic drag-and-drop charts to create custom metrics that compute at different granularities.

What You'll Build

A set of four interconnected sales analytics visualizations using the Sample - Superstore dataset, powered by custom calculated fields and FIXED LOD expressions.

By the end of this project, you'll have:

  • Calculated fields including a Profit Ratio and a Discount Band classification that create custom metrics beyond what the raw data provides.
  • FIXED LOD expressions that compute Sales per Customer and Regional Profit benchmarks independent of your view's granularity.
  • Four polished visualizations: a filled map, a trend line chart, a ranked bar chart, and a scatter plot ready to be assembled into a dashboard.
  • Secret Mission: Add a dual-axis trend line chart comparing Sales and Profit over time with synchronized axes.

Are there any prerequisites?

This project assumes basic familiarity with the Tableau interface. You should be comfortable opening workbooks, navigating worksheets, and dragging fields to shelves.

Connect to Superstore and Explore the Data

Every visualization starts with a data source. Before building charts, you need to connect Tableau to a dataset and understand what fields are available to work with.

In this step, you will connect to the Sample - Superstore dataset that ships with Tableau. You will explore its fields on the Data Source page, then open a blank worksheet where the real building begins.

In this step, get ready to:
  • Connect to the Sample - Superstore data source.
  • Explore dimensions and measures on the Data Source page.
  • Open a worksheet and confirm all fields are visible.
Open Sample - Superstore

Sample - Superstore is a dataset bundled with every Tableau installation. It contains information about products, customers, and sales for a fictitious retail company.

  • On the Start page, look at the Connect pane on the left side.
  • Under Saved Data Sources, click Sample - Superstore.

✔️ I see the Data Source page

You are connected. Continue to the next action below to load the Orders table.

ⓧ I don't see Sample - Superstore listed

If Sample - Superstore does not appear under Saved Data Sources, use this alternative path.

  • In the Connect pane, click Microsoft Excel.
  • Navigate to Documents/My Tableau Repository/Datasources/ and locate the Sample - Superstore file.
  • Select it and click Open.

The Data Source page opens with the same result as the primary path.

The Data Source page shows the available tables in the connected data source.

  • Drag the Orders table from the left pane onto the canvas area in the center.

You should see a preview of the first 1,000 rows of data populate below the canvas.

What is Sample - Superstore?

This dataset simulates a retail company's order history. It includes dates, customer details, product categories, geographic regions, and financial measures like Sales, Profit, Discount, and Quantity.

Profit values can be positive or negative, which makes this dataset ideal for visualizations that highlight both strong and weak performance.

Don't see any tables to drag?

Make sure you clicked Sample - Superstore (not a blank file or a different data source). If the left pane shows no tables, close the data source connection and try the Microsoft Excel alternative path described above.

Help me connect to Sample - Superstore in Tableau

Explore the Data Source page

With the Orders table loaded, the data preview shows every column in the dataset. Tableau automatically classifies each field as either a dimension or a measure based on its data type.

  • Review the field headers in the data preview. Look for the data type icons Tableau assigned to each column.
  • Identify the calendar icons (dates), Abc labels (strings), and # symbols (numbers).
  • Scroll through the columns to confirm you can see all the fields listed below.

What are dimensions and measures?

Dimensions are categorical fields like Order Date, Customer Name, Segment, Country/Region, State/Province, City, Region, Category, Sub-Category, and Product Name. They describe what you are looking at.

Measures are numeric fields like Sales, Profit, Discount, and Quantity. They describe how much of something exists. Tableau aggregates measures (sums, averages) when you drag them into a view.

Navigate to a worksheet

The Data Source page is for connecting and previewing. The actual visualization building happens on worksheets.

  • Click the Sheet 1 tab at the bottom of the screen.

A blank worksheet opens. The Data pane on the left now shows all fields organized into two groups separated by a gray line.

  • Confirm the Dimensions section (above the gray line) contains fields like Order Date, Customer Name, Segment, Region, Category, and Sub-Category.
  • Confirm the Measures section (below the gray line) contains Sales, Profit, Discount, and Quantity.

Why does the gray line matter?

The gray line is Tableau's visual separator between dimensions and measures. Dimensions appear above the line and produce headers or categories when added to a view. Measures appear below the line and produce axes or aggregated numbers.

Knowing which side of the line a field lives on helps you predict what Tableau will do when you drag it onto a shelf.

Missing fields in the Data pane?

If you see fewer fields than expected, make sure you dragged the Orders table (not Returns or People) onto the canvas on the Data Source page. Click the Data Source tab at the bottom left to go back and verify.

Help me find all the Superstore fields in my Data pane

Your data source is connected and all fields are ready. Next up, you will create calculated fields that go beyond the raw data to compute custom metrics like Profit Ratio and Discount Band.

Create Calculated Fields

Your data source is connected and your fields are visible. Now it's time to go beyond what the dataset gives you out of the box.

Tableau's built-in Sales and Profit fields are useful on their own, but real analysis requires custom metrics. Calculated fields let you define your own formulas that Tableau evaluates row by row or at an aggregate level.

In this step, get ready to:
  • Create a Profit Ratio calculated field that divides total profit by total sales.
  • Create a Discount Band calculated field that classifies orders into discount categories.
  • Verify both fields work by building a quick test chart.
Create the Profit Ratio field

Profit Ratio tells you what percentage of each dollar in sales becomes actual profit. A ratio of 0.15 means 15 cents of every dollar is profit.

  • In the top menu bar, click Analysis.
  • Click Create Calculated Field.
  • The Calculation Editor dialog opens. In the name field at the top, type Profit Ratio.
  • In the formula area below the name, enter this formula:
SUM([Profit])/SUM([Sales])
  • Click OK to save the field.

What does this formula do?

SUM([Profit]) adds up all the profit values in whatever grouping your view shows. SUM([Sales]) does the same for sales. Dividing one by the other gives you the profit margin as a decimal.

Because both sides use SUM(), this is an aggregate calculation. Tableau evaluates it after grouping your data by whatever dimensions are in the view.

The new Profit Ratio field appears in the Data pane under Measures with an = icon indicating it is a calculated field.

Now format it so Tableau displays it as a percentage instead of a raw decimal.

  • In the Data pane, right-click Profit Ratio.
  • Select Default Properties, then click Number Format.
  • In the dialog that opens, select Percentage.
  • Set decimal places to 2.
  • Click OK.

Don't see Profit Ratio in the Data pane?

Make sure you clicked OK in the Calculation Editor. If the formula has a red underline or an error message, check that you typed the square brackets around [Profit] and [Sales] exactly. Field names are case-sensitive in Tableau.

help me fix my Profit Ratio calculated field in Tableau

Create the Discount Band field

The Superstore dataset has a raw Discount field with decimal values (0.1, 0.2, 0.4, etc.). A classification field groups these into human-readable bands so you can spot patterns in your charts.

  • Click Analysis in the top menu bar.
  • Click Create Calculated Field.
  • In the name field at the top of the Calculation Editor, type Discount Band.
  • In the formula area, enter this formula:
IF [Discount] = 0 THEN "No Discount"
ELSEIF [Discount] < 0.2 THEN "Low (1-19%)"
ELSEIF [Discount] < 0.4 THEN "Medium (20-39%)"
ELSE "High (40%+)"
END
  • Click OK to save the field.

What does this formula do?

This IF/ELSEIF chain checks the raw [Discount] value for each order and assigns a text label. Orders with no discount get "No Discount". Orders between 1% and 19% get "Low". The chain continues up to "High" for 40% and above.

Because the formula references an unaggregated field and returns a string, Tableau places Discount Band in Dimensions (above the gray line) rather than Measures.

You should see Discount Band appear in the Data pane under Dimensions with an = icon.

Seeing a formula error?

Tableau's formula editor highlights errors in red. The most common issues are missing quotes around the string values (each text value needs double quotes) and misspelling ELSEIF as "ELSE IF" with a space.

help me fix my Discount Band calculated field formula

Verify your calculated fields

A quick test chart confirms both fields are working correctly before you move on.

  • In the Data pane, drag Discount Band to the Rows shelf.
  • Drag Sales to the Columns shelf.

You should see a horizontal bar chart showing Sales broken down by your four discount categories: No Discount, Low (1-19%), Medium (20-39%), and High (40%+).

What should I see?

Four bars with different lengths. "No Discount" typically has the longest bar since most Superstore orders have zero discount. If you see all four bands with varying bar lengths, both your Discount Band logic and Sales aggregation are working.

  • Clear the test view by pressing Ctrl+Z twice (once to undo Sales, once to undo Discount Band). Your worksheet should be blank again.

Don't see all four bands?

If you only see some bands, double-check that your Discount Band formula includes all four conditions. Open it by right-clicking Discount Band in the Data pane and selecting Edit. Compare your formula line by line against the one above.

help me troubleshoot my Discount Band verification in Tableau

✔️ Awesome, I've got everything!

Great. Confirm your worksheet is blank and you can see both Profit Ratio (under Measures) and Discount Band (under Dimensions) in the Data pane, each with an = icon.

ⓧ I'd like to double check the formulas

Here are both formulas for reference.

Profit Ratio (appears under Measures, formatted as Percentage with 2 decimal places):

SUM([Profit])/SUM([Sales])

Discount Band (appears under Dimensions):

IF [Discount] = 0 THEN "No Discount"
ELSEIF [Discount] < 0.2 THEN "Low (1-19%)"
ELSEIF [Discount] < 0.4 THEN "Medium (20-39%)"
ELSE "High (40%+)"
END

You now have two custom metrics that go beyond the raw dataset. Next up, you will create LOD expressions that compute values at a completely different granularity than your view.

Create LOD Expressions

Your calculated fields from the last step work great for row-level classifications and aggregated ratios. But what happens when you need a metric computed at a completely different granularity than what your view shows?

That is the problem Level of Detail (LOD) expressions solve. In this step, you will create two FIXED LOD expressions that compute metrics locked to a specific dimension, regardless of what dimensions appear in your view.

In this step, get ready to:
  • Create a FIXED LOD expression computing Sales per Customer.
  • Create a FIXED LOD expression computing Regional Profit benchmarks.
  • Verify that LOD expressions compute independently of the view's dimensions.
Create the Sales per Customer LOD

A regular SUM([Sales]) aggregation changes based on whatever dimensions you drag into the view. An LOD expression lets you lock a calculation to a specific dimension so the result stays fixed no matter what else is in the view.

  • Go to Analysis > Create Calculated Field.
  • In the Calculation Editor, name the field Sales per Customer.
  • Enter the following formula:
{FIXED [Customer Name] : SUM([Sales])}
  • Click OK.

What does this formula do?

The curly braces { } mark this as an LOD expression. FIXED tells Tableau to compute the result locked to the dimension you specify.

In this case, Tableau sums all Sales for each unique Customer Name. If your view later shows data by Region, each row still displays that customer's total Sales across all Regions. The calculation ignores the view's granularity entirely.

The new field appears in the Data pane under Measures with an = icon.

  • In the Data pane, right-click Sales per Customer.
  • Select Default Properties > Number Format.
  • In the dialog, select Currency (Standard) with 0 decimal places.
  • Click OK.

Formula showing an error?

Make sure you included the curly braces { } around the entire expression. LOD expressions use curly braces, not parentheses. Also check that [Customer Name] matches the exact field name in your Data pane (it is case-sensitive).

help me fix my LOD expression formula

Create the Regional Profit benchmark LOD

Your second LOD expression computes total Profit locked to the Region dimension. This is useful for benchmarking. You can compare any state's profit against its entire region's profit total.

  • Go to Analysis > Create Calculated Field.
  • Name the field Regional Profit.
  • Enter the following formula:
{FIXED [Region] : SUM([Profit])}
  • Click OK.

What does this formula do?

This expression sums Profit for each Region. Even when your view drills down to the State or City level, this field always returns the Region-level total. It ignores all finer-grained dimensions in the view.

FIXED LOD expressions also ignore all filters in the view except context filters, data source filters, and extract filters. This makes them stable reference values for benchmarking.

  • In the Data pane, right-click Regional Profit.
  • Select Default Properties > Number Format.
  • Select Currency (Standard) with 0 decimal places.
  • Click OK.

Don't see the field under Measures?

FIXED LOD expressions that return a numeric aggregate (like SUM) appear under Measures automatically. If yours ended up in Dimensions, double-check that you used SUM([Profit]) as the aggregate expression (not just [Profit] without an aggregation function).

help me figure out why my LOD field is in the wrong section

Verify LOD behavior

Time to see FIXED in action. You will build a quick test view that proves the LOD expression ignores the State dimension and only computes at the Region level.

  • Drag Region to Rows.
  • Drag State/Province to Rows (drop it to the right of Region).
  • Drag SUM(Profit) to Columns.
  • Drag Regional Profit to Columns as well (drop it to the right of the existing axis).

You now have two bar charts side by side. Look at the values carefully.

What should I see?

The SUM(Profit) column shows different values for each state. The Regional Profit column shows the same value for every state within the same region.

This is FIXED in action. The expression ignores the State dimension in the view and computes only at the Region level. Every state in the West region sees the same West total. Every state in the East region sees the same East total.

  • Press Ctrl+Z repeatedly (or drag all fields off the shelves) to clear the worksheet back to a blank state.

Regional Profit showing different values per state?

If the values differ by state, the formula may be referencing the wrong dimension. Open the calculated field (double-click Regional Profit in the Data pane) and verify it reads {FIXED [Region] : SUM([Profit])} exactly. If you accidentally used [State/Province] instead of [Region], it would compute at the state level.

help me debug my Regional Profit LOD expression

Why FIXED over INCLUDE or EXCLUDE?

Tableau offers three LOD keywords: FIXED, INCLUDE, and EXCLUDE. FIXED is the most commonly used in practice because it computes at an absolute granularity you define. It does not depend on what dimensions happen to be in the view.

INCLUDE adds a dimension to the view's granularity. EXCLUDE removes one. Both are relative to the current view. FIXED is absolute, making it the most predictable and transferable LOD skill.

✔️ Awesome, I've got everything!

Great. Confirm that you have four calculated fields in your Data pane: Profit Ratio, Discount Band, Sales per Customer, and Regional Profit. All four show an = icon.

ⓧ I'd like to double check the full formulas

Here are all four calculated fields you should have at this point:

  • Profit Ratio (Measure, Percentage 2dp): SUM([Profit])/SUM([Sales])
  • Discount Band (Dimension): IF [Discount] = 0 THEN "No Discount" ELSEIF [Discount] < 0.2 THEN "Low (1-19%)" ELSEIF [Discount] < 0.4 THEN "Medium (20-39%)" ELSE "High (40%+)" END
  • Sales per Customer (Measure, Currency Standard 0dp): {FIXED [Customer Name] : SUM([Sales])}
  • Regional Profit (Measure, Currency Standard 0dp): {FIXED [Region] : SUM([Profit])}

You now have all the calculated fields and LOD expressions that will power your visualizations. Next up, you will put them to work by building a filled map and a trend line chart.

Build the Filled Map and Line Chart

Your calculated fields and LOD expressions are ready. Now it is time to put them to work in actual visualizations.

In this step, you will build two chart types that answer different analytical questions. A filled map reveals geographic patterns in profitability, while a line chart with trend lines shows whether sales growth is accelerating or flattening over time.

In this step, get ready to:
  • Build a filled map showing Profit Ratio by state with a diverging color palette.
  • Build a line chart showing quarterly Sales trends broken down by Category.
  • Add trend lines to reveal growth direction for each product category.
Build a filled map (Profit Ratio by state)

A filled map colors entire geographic regions instead of placing dots on them. This makes it easy to spot which states are profitable and which are bleeding money at a glance.

  • Right-click the Sheet 1 tab at the bottom of the screen.
  • Click New Worksheet to create a fresh sheet.
  • Double-click the new tab and rename it to Profit Map.

Now build the map itself.

  • In the Data pane on the left, double-click State/Province. Tableau automatically creates a symbol map.
  • In the Marks card, click the mark type dropdown (it currently says Automatic or Circle).
  • Select Map from the dropdown. The states now appear as filled shapes instead of dots.
  • Drag Profit Ratio from the Data pane onto Color on the Marks card.

Tableau applies a color gradient, but the default palette does not clearly separate positive from negative values. You need a diverging palette centered at zero.

  • Click the Color legend that appeared on the right side of the view.
  • In the Edit Colors dialog, click the palette dropdown and choose a diverging palette (such as Red-Green Diverging or Orange-Blue Diverging).
  • Check the Stepped Color checkbox if you want discrete bands, or leave it unchecked for a smooth gradient.
  • Click Advanced and check the Center checkbox. Set the center value to 0.
  • Click OK to apply the color changes.

Why center at zero?

Centering the diverging palette at zero means negative profit ratios appear in one color and positive ratios in another. Without this, the midpoint of the palette lands on an arbitrary value and the colors lose their intuitive meaning.

Now add more detail to the map.

  • Drag Sales to Size on the Marks card. States with higher revenue appear more prominently.
  • Drag Region to Tooltip on the Marks card.
  • Drag State/Province to Tooltip on the Marks card.
  • Drag Sales to Tooltip on the Marks card.
  • Drag Profit to Tooltip on the Marks card.

Finally, set a descriptive title for this visualization.

  • Double-click the sheet title at the top of the view.
  • Replace the text with Profit Ratio by State.
  • Click OK.

Hover over a few states to confirm the tooltip shows Region, State/Province, Sales, and Profit values. States with negative profit ratios should appear in one color and positive states in the other.

Seeing dots instead of filled states?

Make sure you changed the mark type to Map in the Marks card dropdown. If it still says Automatic or Circle, the states will appear as point markers instead of filled shapes.

help me fix my Tableau map so states appear filled instead of as dots

Build a line chart (Sales trend by Category)

A line chart is the best way to show how a measure changes over time. You will break Sales down by product Category to see which business segment is growing fastest.

  • Create a new worksheet by clicking the new worksheet icon (the tab icon with a plus sign) at the bottom of the screen.
  • Double-click the new tab and rename it to Sales Trend.

Now set up the time axis.

  • Drag Order Date to the Columns shelf. Tableau creates a YEAR(Order Date) pill.
  • Click the + on the YEAR(Order Date) pill to drill down to Quarter.
  • Drag Sales to the Rows shelf. Tableau creates a line chart with SUM(Sales) on the Y-axis.
  • Drag Category to Color on the Marks card. You now see three colored lines: Furniture, Office Supplies, and Technology.

Why drill to Quarter instead of Month?

Quarterly data smooths out month-to-month noise while still revealing seasonal trends. Monthly granularity creates a jagged line that is harder to read, and yearly granularity hides within-year patterns entirely.

Format the Y-axis so the dollar values are clean and readable.

  • Right-click the Y-axis (the SUM(Sales) axis on the left).
  • Click Format.
  • In the Format pane that opens on the left, click the Numbers dropdown under the Axis tab.
  • Select Currency (Standard) with 0 decimal places.

Now add labels to highlight the peak and trough values.

  • Drag Sales to Label on the Marks card.
  • Click the Label button on the Marks card to open the label settings.
  • Under Marks to Label, select Min/Max. This labels only the highest and lowest points to avoid clutter.

Set the chart title.

  • Double-click the sheet title at the top of the view.
  • Replace the text with Sales Trend by Category (Quarterly).
  • Click OK.

Only seeing one line instead of three?

Make sure Category is on Color in the Marks card, not on Rows or Columns. If it ended up on the wrong shelf, drag it off and drop it onto Color instead.

help me split my Tableau line chart into separate lines per Category

Add a trend line to the line chart

Trend lines fit a statistical model to your data points, making it clear whether each category is growing, flat, or declining over time.

  • Make sure the Sales Trend worksheet is still active.
  • Go to Analysis in the top menu bar.
  • Hover over Trend Lines.
  • Click Show Trend Lines. Tableau adds a linear trend line for each of the three categories.
  • Hover over any trend line to see its R-squared value and slope.
  • If the trend lines feel too visually dominant, right-click any trend line and select Format Trend Lines to reduce line thickness or switch to a dashed style.

What do the trend lines tell you?

A steeper upward slope means faster growth. Technology typically shows the steepest trend, indicating it is the fastest-growing product category.

The R-squared value tells you how closely the data follows the trend. A higher R-squared means the growth pattern is consistent rather than erratic.

You should now see three colored lines with linear trend lines overlaid on each. The Technology line typically has the steepest upward slope.

Two visualizations down, two to go. Next up, you will build a ranked bar chart and a scatter plot that puts your LOD expressions to work in tooltips.

Build the Bar Chart and Scatter Plot

Your map and trend chart revealed where profit is strong and how categories perform over time. Now you need to answer a more granular question: which specific sub-categories drive the most revenue, and which ones are actually profitable?

In this step, you will build two more visualizations that use your calculated fields and LOD expressions to surface deeper insights. A ranked bar chart will show Sub-Category sales colored by profitability. A scatter plot will correlate Sales and Profit with your Discount Band classification and LOD-powered tooltips.

In this step, get ready to:
  • Build a horizontal bar chart ranking Sub-Categories by Sales, colored by Profit Ratio.
  • Build a scatter plot correlating Sales and Profit, enhanced with Discount Band colors and LOD tooltips.
  • Add a reference line and trend line to make the scatter plot analytically rich.
Build a horizontal bar chart (Sales by Sub-Category)

A bar chart ranked by a single measure is one of the clearest ways to compare categories. Adding a second measure on Color transforms it from a simple ranking into a profitability diagnostic.

  • Create a new worksheet by right-clicking the current sheet tab at the bottom and selecting New Worksheet.
  • Rename the new worksheet to Sub-Category Sales by double-clicking the tab name.
  • In the Data pane, drag Sub-Category to Rows.
  • Drag Sales to Columns.

Tableau creates a horizontal bar chart with one bar per sub-category.

  • Sort the bars in descending order by clicking the sort descending icon in the toolbar (the icon with a downward arrow and horizontal bars).
  • Drag Profit Ratio to Color on the Marks card.
  • Click the Color legend that appears, then click Edit Colors.
  • In the Edit Colors dialog, choose a Diverging palette (select Red-Green Diverging).
  • Check the Stepped Color checkbox if desired, then set the center to 0 so negative profit ratios appear red and positive ones appear green.
  • Click OK to apply.

Why color the bars by Profit Ratio?

A simple bar chart sorted by Sales shows you which sub-categories earn the most revenue. Adding Profit Ratio on Color reveals a critical second dimension: whether that revenue is actually profitable.

Sub-categories like Tables and Bookcases often rank high by Sales but glow red because their profit margins are negative. This is the kind of insight that separates analytical dashboards from simple reports.

  • Drag Sales to Label on the Marks card so each bar displays its value.
  • Right-click the SUM(Sales) pill on the Label, select Format, and set it to Currency (Standard) with 0 decimal places.
  • Double-click the sheet title at the top and change it to Sales by Sub-Category (Colored by Profit Ratio).

You should see 17 sub-categories ranked from highest to lowest Sales, with diverging colors showing profitability at a glance.

Bars not sorted correctly?

If your bars appear in alphabetical order instead of by Sales, right-click the Sub-Category axis on the left, select Sort, then set Sort By to Field, choose Sales, Sum, and Descending.

help me sort my Tableau bar chart by Sales descending

Build a scatter plot (Sales vs. Profit by Sub-Category)

Scatter plots reveal relationships between two measures. By placing Sales on one axis and Profit on the other, you can spot which sub-categories earn high revenue with strong margins and which ones lose money.

  • Create a new worksheet and rename it Sales vs Profit.
  • Drag Sales to Columns.
  • Drag Profit to Rows.
  • Drag Sub-Category to Detail on the Marks card.
  • Drag Discount Band to Color on the Marks card.
  • Drag Quantity to Size on the Marks card.

You now have a scatter plot with one mark per Sub-Category. Each bubble is colored by average discount level and sized by units sold.

What does each encoding show?

  • Position (X-axis) shows total Sales for that sub-category.
  • Position (Y-axis) shows total Profit.
  • Color shows the Discount Band classification you created earlier.
  • Size shows Quantity sold, so larger bubbles represent high-volume sub-categories.
  • Add a reference line at the zero-profit mark: right-click the Profit (Y) axis and select Add Reference Line.
  • In the dialog, set Value to Constant and enter 0.
  • Set the line formatting to a solid gray line, then click OK.

Why add a zero-line?

The zero-line on the Profit axis is your break-even boundary. Any mark below it represents a sub-category that loses money overall. This makes the chart instantly actionable for a business audience.

  • Add a trend line: go to Analysis > Trend Lines > Show Trend Lines.
  • Double-click the sheet title and change it to Sales vs. Profit by Sub-Category.

Your scatter plot now has a clear zero-profit boundary and a trend line showing the general Sales-to-Profit relationship.

Reference line not appearing?

Make sure you right-clicked directly on the Profit Y-axis (the vertical axis on the left) and not on a mark or whitespace. If you do not see Add Reference Line in the context menu, the axis may not be continuous. Confirm that Profit is on Rows as a measure (green pill).

help me add a reference line at zero on my Tableau scatter plot Y-axis

Add the LOD insight to the scatter plot

Your scatter plot already shows the Sales-vs-Profit relationship at the Sub-Category level. Now you will layer in your FIXED LOD expression to reveal customer-level spending patterns in the tooltip, computed independently of the view's granularity.

  • Drag Sales per Customer to Tooltip on the Marks card.
  • Click Tooltip on the Marks card to open the Edit Tooltip dialog.
  • In the dialog, add a line of text that reads: Avg. customer spend: <Sales per Customer>.
  • Click OK to close the dialog.

Why does this work across different granularities?

Your view shows data at the Sub-Category level, but Sales per Customer is a FIXED LOD expression locked to Customer Name. Tableau computes each customer's total spend independently, then aggregates those values for the tooltip.

This means hovering over any sub-category mark shows the average customer-level spend for that group. The LOD does the heavy lifting of computing at one grain and displaying at another.

  • Hover over a few marks to confirm the tooltip shows the custom text with the Sales per Customer value.

Your scatter plot now includes the LOD-powered tooltip, completing the fourth visualization.

Secret mission

Build a Dual-Axis Trend Chart

Your four visualizations tell a powerful story individually. But what happens when Sales rise and Profit doesn't follow? Build a dual-axis chart that overlays both measures on a single timeline to surface those dangerous divergences.

Clean Up Your Resources

Clean Up Your Resources

This project runs entirely locally using Tableau Desktop Public Edition and the bundled Sample - Superstore dataset. There are no ongoing costs or cloud resources to worry about.

Decide whether to keep your workbook open, save it for later, or discard it entirely.

Resources you used:

  • Tableau workbook containing five worksheets (Profit Map, Sales Trend, Sub-Category Sales, Sales vs Profit, Dual Trend) and four calculated fields (Profit Ratio, Discount Band, Sales per Customer, Regional Profit).

Keep everything running

No action needed. Choose this if you are still actively building or plan to extend these visualizations into a dashboard.

  • Leave Tableau Desktop Public Edition open with your workbook.
  • Your worksheets, calculated fields, and LOD expressions remain in memory until you close the application.

Pause - I'll come back to this later

Save your workbook locally so you can pick up where you left off without rebuilding everything.

  • In Tableau, press Ctrl+S or go to File > Save As.
  • Choose a location on your computer (such as your Desktop or Documents folder) and save the file as a .twbx packaged workbook.
  • Close Tableau Desktop Public Edition.

Why save as .twbx?

A .twbx file packages the data source and workbook together into a single file. This means you can reopen it later without reconnecting to the data.

Delete - I don't want to use this again

Remove your workbook entirely. The Sample - Superstore dataset stays bundled with Tableau and is unaffected.

  • In Tableau, go to File > Close. When prompted to save, click Don't Save (Windows) to discard the workbook.
  • If you previously saved a .twbx file, navigate to the folder where you saved it and delete it.

What about the Sample - Superstore data?

The Sample - Superstore dataset is bundled with Tableau Desktop Public Edition. You do not need to delete it separately. It remains available for future projects.

Nice Work!

Nice Work!

You just built four publication-ready sales analytics visualizations powered by calculated fields and LOD expressions. These go well beyond basic drag-and-drop charts and demonstrate the analytical thinking that separates a Tableau practitioner from a casual user.

Here's what you accomplished:

  • Created calculated fields (Profit Ratio and Discount Band) and two FIXED LOD expressions that compute metrics at a granularity independent of the view.
  • Built four distinct visualizations: a filled map with diverging colors, a quarterly trend line chart by Category, a ranked horizontal bar chart colored by profitability, and a scatter plot with LOD-powered tooltips.
  • Applied trend lines, diverging color palettes, reference lines, and custom formatting to add analytical depth to every chart.
  • Secret Mission: Built a dual-axis trend chart with synchronized axes, contrasting mark types, trend lines on both measures, and annotations highlighting key insights.

These visualizations are ready to be assembled into an interactive dashboard and published to Tableau Public in a follow-on project.

Ready to quiz yourself?