Tableau Bar Chart: How to Make One, Step by Step
Published: . Last updated:
Applies to: Tableau Desktop and Tableau Public.
To make a Tableau bar chart, drag a dimension (your categories) to the Columns shelf and a measure (your numbers) to the Rows shelf. Tableau draws vertical bars. Put the measure on Columns instead, or click Swap Rows and Columns, for horizontal bars. If Tableau draws a line, change the Marks card drop-down to Bar.
Just need one quick chart, no install? Use the free bar graph maker.
On this page
Before you start: dimensions, measures and your data
Every Tableau bar chart is built from two kinds of fields. Tableau calls them dimensions and measures. Dimensions group or split the data and usually hold names, dates or places. Measures hold numbers, and Tableau aggregates them (adds them up, averages them, counts them) when they go into a view. You'll see the aggregation in front of the field name, like SUM(Sales) (Tableau Help).
For a bar chart you need one of each: a dimension for the categories and a measure for the bar lengths. Here's the small table this guide uses.
| Region | Q1 Sales | Q2 Sales |
|---|---|---|
| North | 42 | 46 |
| South | 35 | 31 |
| East | 51 | 55 |
| West | 28 | 37 |
To bring a spreadsheet in, open Tableau, click Microsoft Excel under Connect, pick your workbook and click Open. If the file has one table, click the sheet tab at the bottom to start building (Tableau Help). Region shows up as a dimension and the sales columns show up as measures.
Which Tableau? Tableau's bar chart instructions apply to Tableau Desktop and to web authoring in the browser (Tableau Help). If you don't have a work license, Tableau Public is free, and you can author vizzes in the browser or download Tableau Desktop Public Edition. Two catches: anything you publish to Tableau Public can be seen by anyone with the link, and web authoring doesn't work on mobile devices (Tableau Public FAQ). Tableau's student page says the free edition isn't for commercial use (Tableau for Students). Check those pages before you rely on them, since offers change.
Never publish class or work data with names or private details to Tableau Public. Use Desktop Public Edition and save the file locally instead.
Step by step: make a basic bar chart in Tableau
Tableau's own definition is short: you create a bar chart by putting a dimension on the Rows shelf and a measure on the Columns shelf, or the other way around (Tableau Help).
- Open a new worksheet. Click the sheet tab after connecting to your data.
- Drag your dimension to Columns. In the example, drag Region to the Columns shelf at the top of the view.
- Drag your measure to Rows. Drag Q1 Sales to the Rows shelf. It appears as SUM(Q1 Sales). With a dimension on Columns and a measure on Rows, you get vertical bars (Tableau Help).
- Check the mark type. Tableau picks the Bar mark type on its own when the fields are arranged this way. If you see a line instead, which is what happens when your category is a date, open the drop-down on the Marks card and choose Bar (Tableau Help).
That's a working bar chart. The rest of this page covers the changes people usually want next: flipping it sideways, sorting, labels, stacking and grouping.
The shortcut: build it with Show Me
If dragging fields onto shelves feels unfamiliar, Show Me does the arranging for you. Hold Ctrl (Command on a Mac) and click the fields you want in the Data pane, for example Region and Q1 Sales. Then click Show Me on the toolbar and pick a chart (Tableau Help).
Chart types that fit your selected fields are highlighted. Hover over any icon and Tableau tells you the minimum fields that chart needs, which is handy when a bar option is grayed out (Tableau Help). Show Me's options include stacked bars and side-by-side bars.
Not sure which bar layout suits your data? Our guide to the types of bar graphs shows each one with an example.
Horizontal or vertical bars: use Swap
Orientation depends only on which shelf holds the measure. Measure on Rows gives vertical bars. Measure on Columns gives horizontal bars (Tableau Help).
You don't have to drag anything to flip it. The Swap Rows and Columns button on the toolbar moves the fields on Rows to Columns and the other way around (Tableau Help). One click and your columns become horizontal bars.
Horizontal bars are usually easier to read when category names are long, like product names or full survey answers, because the labels sit on one line instead of slanting under each bar.
Sort the bars
A bar chart is easier to read when the bars run from largest to smallest. Tableau gives you a few ways to sort (Tableau Help):
- Axis sort icon. Hover over the value axis and a sort icon appears. One click sorts descending, two clicks sort ascending, and a third click clears the sort.
- Toolbar buttons. Select the dimension, then click Sort Ascending or Sort Descending on the toolbar. These sort by the measure in the view (Tableau Help).
- Sort dialog. Right-click the dimension field and choose Sort for more control: data source order, alphabetic, by a field, or a manual order.
Categories with a natural order, like months or grade levels, should stay in that order. Sort by size only when the categories have no built-in sequence.
Add value labels to the bars
Tableau calls the numbers on bars mark labels. You can turn them on three ways (Tableau Help):
- Click the Show Mark Labels button on the toolbar, which switches labels on and off for the sheet (Tableau Help).
- On the Marks card, click Label and check Show mark labels.
- Drag a field onto Label on the Marks card to label each bar with that field.
For a class assignment, also give the sheet a clear title that says what was measured and when, and make sure the axis title names the units.
Make a stacked bar chart
A stacked bar splits each bar into parts. By default the stack doesn't show its total, so the last two steps add one.
- Drag a second dimension onto Color on the Marks card. Tableau's own example drags Ship Mode to Color, and each bar becomes a stack showing how much each shipping mode contributed (Tableau Help).
- From the Analytics pane, drag a Reference Line into the view and drop it on Cell.
- Set the aggregation to Sum, the label to Value, and the line format to None, so only the total number shows above each bar (Tableau Help).
Stacked bars are good for showing how a total breaks into parts. They're weaker for comparing the middle segments to each other, since those segments don't start from the same baseline. If each bar should add to 100%, our stacked bar graph maker does both regular and 100% stacked bars without any setup.
Make side-by-side (grouped) bars
Side-by-side bars put two or more values next to each other in each category, like Q1 and Q2 sales for every region. With the example data, the fastest way is Show Me:
- Hold Ctrl (Command on a Mac) and select Region, Q1 Sales and Q2 Sales in the Data pane.
- Click Show Me and choose side-by-side bars.
When the view has more than one measure and you pick side-by-side bars, Tableau adds two fields for you: Measure Names, which labels each bar Q1 Sales or Q2 Sales, and Measure Values, which holds the numbers (Tableau Help). Each region then gets a Q1 bar and a Q2 bar.
If your data is laid out differently, with one sales column and a separate Quarter column, hover the side-by-side bars icon in Show Me to see which fields it needs before you pick it (Tableau Help).
For homework or a slide where you just need the picture, the double bar graph maker builds the same grouped chart from pasted data.
Export the chart as an image
How you get a picture out depends on which Tableau you're in.
| Where you built it | How to export | Formats |
|---|---|---|
| Tableau Desktop | Worksheet > Export > Image, then choose a name and location and click Save | BMP, JPEG, PNG or SVG |
| Tableau Desktop (to paste) | Worksheet > Copy > Image, pick what to include, then paste into Word or PowerPoint | Clipboard image |
| Tableau Cloud or Tableau Server | Click Download at the top of the view and choose Image | PNG |
The Desktop steps come from Tableau's export article (Tableau Help), and the Cloud and Server steps from its download article, which notes that filters and selections you've applied carry over into the image (Tableau Help). On Tableau Public, viewers can use the Download link on a viz unless the author turns downloads off in the viz settings (Tableau Public FAQ).
Putting the chart into a slide deck? See how to make a bar graph in PowerPoint, or in Word for a report. Keeping notes in Notion? Here's how Notion charts and image uploads work.
When Tableau is more than you need
Tableau is worth learning if your class or job uses it, or if you'll be filtering, updating and sharing the same data again and again. It's a lot of setup for one chart, though. You install software or make an account, connect a file, and learn the shelves before you see a single bar.
For a quick one-off chart, our free bar graph maker runs in the browser with nothing to install and no sign-up. Type or paste your categories and numbers, switch between vertical, horizontal, grouped or stacked, and download a PNG or SVG. Your data stays in your browser.
If you already work in a spreadsheet, the Excel bar graph guide may be the quicker route. Otherwise, open the bar graph maker and paste your table.
Related guides
Frequently asked questions
Why does Tableau show a line instead of a bar chart?
Tableau picks the mark type from the fields you use. With a date on Columns and a measure on Rows, it starts with a line. Open the drop-down on the Marks card and choose Bar to switch to bars.
How do I make a horizontal bar chart in Tableau?
Put the measure on the Columns shelf and the dimension on the Rows shelf. If you already built vertical bars, click the Swap Rows and Columns button on the toolbar.
How do I sort a bar chart in Tableau?
Hover over the value axis and click the sort icon: one click sorts descending, two clicks ascending, three clicks clear the sort. You can also use the Sort Ascending and Sort Descending toolbar buttons, or right-click the dimension and choose Sort.
How do I show totals on a stacked bar chart in Tableau?
From the Analytics pane, drag a Reference Line into the view and drop it on Cell. Set the aggregation to Sum, the label to Value and the line format to None. The total then appears on each stacked bar.
Can students use Tableau for free?
Tableau Public is free, and Tableau's student page offers Tableau Desktop Public Edition at no cost for learning. Work published to Tableau Public is visible to anyone with the link, and the free edition isn't for commercial use. Check Tableau's site for current terms.
How this page is checked
I checked this guide against Tableau's own help, starting with the Build a Bar Chart article and then the pages for Show Me, sorting, mark labels, Measure Names and Measure Values, and exporting a view. The dimension and measure explanation follows Tableau's article on data types and roles, and the Excel connection step follows its Excel connector page. The Tableau Public FAQ and the Tableau for Students page are where the notes on free use come from, including that the free student edition isn't for commercial use. Offers like that can change, so the guide points you to those pages instead of promising terms. I revise the steps when Tableau changes its menus.
Sources used on this page:
- Build a Bar Chart
- Dimensions and Measures, Blue and Green
- Excel (Tableau connector)
- Use Show Me to Start a View
- The Tableau Workspace
- Sort Data in a Visualization
- Show, Hide, and Format Mark Labels
- Measure Values and Measure Names
- Export Views from Tableau Desktop to Another Application
- Download Views and Workbooks
- Tableau Public FAQ
- Tableau for Students