How to Create KPI in Tableau

Cody Schneider8 min read

Creating a clear Key Performance Indicator (KPI) display in Tableau is one of the best ways to track your business goals at a glance. Instead of digging through dense tables or complex charts, a well-designed KPI gives you an immediate signal of your performance right on your dashboard. This guide will walk you through exactly how to build visually compelling KPI cards in Tableau, moving from a single big number to a more insightful view with period-over-period comparisons and color-coded indicators.

What is a KPI, Really?

Before jumping into Tableau, let's quickly clarify what we mean by "KPI." While people often use "metric" and "KPI" interchangeably, they aren't exactly the same. A metric is just a number that measures something - like website visitors, daily sales, or new leads. A KPI, or Key Performance Indicator, is a specific metric you’ve chosen to track your progress toward a critical business objective.

For example:

  • 'Website Visitors' is a metric.
  • 'Increase monthly website visitors from 10,000 to 15,000 by the end of Q3' makes visitors a KPI because it’s tied to a goal.

In a dashboard, KPIs are often displayed as large, easy-to-read numbers (often called "Big-Ass Numbers" or BANs) so you can get a snapshot of performance in seconds. They are the health monitor for your business goals.

Before You Build: Prep Your Data and Your Goal

A great KPI starts with two things: clean data and a clear question. Before you open Tableau, make sure you know what you want to measure and have the necessary data to do it.

At a minimum, your dataset should contain:

  • The metric itself: A numerical field like Sales, Revenue, Sessions, or Leads.
  • A time dimension: A date field like Order Date or Session Date is essential for tracking performance over time and creating comparisons.
  • Relevant dimensions for filtering: Fields like Region, Product Category, or Campaign Name will allow you to slice and dice your KPI for deeper analysis.

Once your data is ready, confirm the goal of your KPI. Are you tracking Total Revenue for This Quarter? Or New Leads from the US This Month? Knowing this upfront makes the building process in Tableau much smoother.

How to Create a Basic KPI Card in Tableau

Let's build a simple KPI card for "Total Sales." For this example, we'll use Tableau's sample "Superstore" dataset which you have access to by default.

Step 1: Create a New Worksheet

First, connect to the "Sample - Superstore" data source. Once it's loaded, open a new worksheet and give it a descriptive name, like "Total Sales KPI." This helps you stay organized when you later assemble these individual KPIs into a master dashboard.

Step 2: Add Your Primary Metric to the View

Find your main metric in the Data pane on the left. In our case, this is the Sales measure.

Click and drag the Sales pill and drop it directly onto the Text box in the Marks card. Just like that, you'll see a number appear in your worksheet. This is your raw KPI value.

Step 3: Format the KPI Number for Impact

The default text is small and not very impressive. We want this number to stand out on a dashboard.

  1. Click on the Text box in the Marks card again. An editor window will pop up.
  2. Click the three dots (...) next to the text field that shows <SUM(Sales)>.
  3. In the "Edit Label" window, highlight the <SUM(Sales)> text. Now you can use the formatting options at the top to change the font, size, and color. Make it something large, like font size 24 or 36, and maybe make it bold. You can also center-align it here.

Step 4: Align the View and Tidy Up

Ensure the number is centered in the sheet by going to the main toolbar at the top and selecting Format > Align > Center for both vertical and horizontal alignment.

You probably also want to format the number as currency. Right-click on the SUM(Sales) pill on the Marks card, select Format..., and in the pane that appears on the left, choose Numbers and select Currency (Custom) to set it up how you like (e.g., $1,234.56K).

Lastly, hide the sheet title by right-clicking it and selecting "Hide Title," as this KPI will get its main heading once placed on the dashboard itself.

Congratulations, you have a basic KPI card! It’s a solid start, but it lacks context. Is this sales number good? Bad? We have no idea without something to compare it to.

Adding Context: Period-over-Period Comparison

A KPI becomes much more powerful when you can see if it's trending up or down. A common way to do this is with a period-over-period (PoP) comparison, like Month-over-Month or Year-over-Year. Let’s add a Month-over-Month percentage change to our Sales KPI.

This requires creating a few calculated fields, which is where Tableau’s true power comes into play.

Step 1: Create a Calculated Field for Current Month Sales

To get a percentage change, we need two numbers: sales for the current month and sales for the previous month. First, let's isolate the current month's sales.

  1. Go to the dropdown arrow at the top of the Data pane and select Create Calculated Field.
  2. Name the field "Current Month Sales".
  3. Enter the following formula:
IF DATEDIFF('month', [Order Date], TODAY()) = 0
THEN [Sales]
END

This formula checks if the difference in months between the 'Order Date' and today is 0 (i.e., it's in the current month). If it is, it returns the sales amount.

  1. Click OK.

Note: If your data is not current up to TODAY(), replace TODAY() with a fixed date for your reference, like MAKEDATE(2023,12,31), or use a parameter.

Step 2: Create a Calculated Field for Previous Month Sales

Now, we do the same for the previous month.

  1. Create another calculated field named "Previous Month Sales".
  2. Enter this formula:
IF DATEDIFF('month', [Order Date], TODAY()) = 1
THEN [Sales]
END

The logic is the same, but now it looks for orders where the difference is 1 month ago.

  1. Click OK.

Step 3: Create the Percentage Change Calculation

With both values ready, we can calculate the percentage difference.

  1. Create a third calculated field named "MoM Sales % Change".
  2. Enter this formula:
(SUM([Current Month Sales]) - SUM([Previous Month Sales]))
/
SUM([Previous Month Sales])

This is the classic (New - Old) / Old formula for percentage change.

  1. Click OK.

Step 4: Add the Percentage Change to the View

Now, drag your new MoM Sales % Change measure and drop it onto the Text box in the Marks card, right underneath your main sales metric.

Right-click the new AGG(MoM Sales % Change) pill you just added, select Format..., and in the pane on the left, go to Numbers and choose Percentage to format it correctly.

Bring it to Life with Conditional Formatting (Up/Down Arrows)

A plain percentage is good, but a colored up or down arrow is instantly understood. Let's add that next.

Step 1: Create a Calculation for the Indicator

We need another calculated field to determine if the performance is positive, negative, or flat.

  1. Create a calculated field named "Sales Trend Indicator".
  2. Enter the following formula:
IF [MoM Sales % Change] > 0 THEN "Up"
ELSEIF [MoM Sales % Change] < 0 THEN "Down"
ELSE "Flat"
END
  1. Click OK.

Step 2: Use the Indicator to Control Shapes and Colors

  1. Drag your new Sales Trend Indicator dimension onto the Shape box in the Marks card. Tableau will assign default shapes.
  2. Now drag another copy of Sales Trend Indicator onto the Color box in the Marks card.
  3. Click the Shape box, and in the dropdown, select the shape palette you prefer (like Arrows). Assign the corresponding up arrow to "Up" and the down arrow to "Down."
  4. Click the Color box and select Edit Colors.... Assign green to "Up" and red to "Down."

Step 3: Arrange the Final View

Finally, click the main Text box in the Marks card one more time. In the editor, arrange the fields so that your shape indicator appears just before your percentage change metric. You can customize the font sizes and colors here to get exactly the look you're after!

You now have a dynamic, context-rich KPI that instantly tells a story. When you place it on a dashboard, anyone can see not just the current sales figures but also how they're trending compared to last month.

Final Thoughts

Building a great KPI in Tableau moves beyond simply displaying a number, it involves packaging that number with context like period-over-period comparisons and visual cues like colored arrows. By mastering calculated fields and formatting Marks cards, you can transform a single metric into a powerful indicator that clearly communicates business performance.

While Tableau is a fantastic tool for deep analysis, we know building these calculations and arranging dashboards takes valuable time you might not have. At Graphed, we created a way to get these insights without any formulas or setup. You can simply connect your data and ask, "Show my total sales KPI this month compared to last month," and get a live, automated dashboard in seconds. We focused on eliminating the manual work so you can spend less time creating reports and more time acting on them.

Related Articles

How to Connect Facebook to Google Data Studio: The Complete Guide for 2026

Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.

Appsflyer vs Mixpanel​: Complete 2026 Comparison Guide

The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.