How to Create a Clustered Horizontal Bar Chart in SPSS

Build a clustered horizontal bar chart in SPSS that compares categories side by side across years or groups, using Chart Builder and the Chart Editor.

By Petrus Sheya

October 9, 2026 · 3 min read

A clustered horizontal bar chart in SPSS needs your data in long format: one row per category per year. Then you build it in Graphs > Chart Builder with the category on the Y axis, the value on the X axis and the year as the cluster.

These steps work in SPSS Statistics on Windows and Mac.

How to build a clustered horizontal bar chart

  1. Put your data in long format. Each row should hold one category for one year, with three columns: Category, Year and Percent. For example, "Airways disease | 2023 | 37" on one row and "Airways disease | 2024 | 36" on the next.
  2. Open Chart Builder. Go to Graphs > Chart Builder.
  3. Add a clustered bar chart. In the Gallery tab, pick Bar and drag the Clustered Bar chart onto the canvas.
  4. Put Category on the Y axis. Drag your Category variable to the Y axis. Putting categories on the Y axis is what makes the bars run horizontally.
  5. Put Percent on the X axis. Drag your value variable, such as Percent, to the X axis.
  6. Cluster by Year. Drag Year into the Cluster on X or Set color box. SPSS now draws a separate bar for each year inside every category.
  7. Generate the chart. Click OK and SPSS draws the chart in the Output Viewer.
  8. Polish it in the Chart Editor. Double-click the chart to open the Chart Editor. From there you can:
    • change the bar colors for each year
    • show data labels on the bars
    • reverse the category order if the list reads upside down
    • set the value axis to run from 0 to 100
    • adjust the bar spacing so the clusters look cleaner

Close the Chart Editor when you're done and the changes stay on the chart in your output.

Restructure wide data before you start

If your sheet has a separate column for each year (say 2023 and 2024 side by side), Chart Builder has no Year variable to cluster on. Convert it to long format first.

  1. Go to Data > Restructure.
  2. Choose Restructure selected variables into cases and click Next.
  3. Follow the wizard and pick your year columns as the variables to turn into rows.
  4. Finish the wizard. You now get one row per category per year, with a new index variable you can rename to Year.

Then go back to step 2 above and build the chart.

FAQ

My data has a separate column for each year. What do I do? Restructure it into long format first with Data > Restructure, so each row holds one category, one year and one value. Chart Builder needs a Year variable to cluster on.

How do I make the value axis run from 0 to 100? Double-click the chart to open the Chart Editor, select the value axis and set its minimum to 0 and maximum to 100 in the Scale tab of the Properties window.

Caption Your Videos in Minutes

and keep people watching

Try Sycamore