Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Power BI Horizontal Table: Step-by-Step Guide

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Power BI has no native "horizontal table" visual, but you can get the same result by pivoting your data so fields become columns and rows become measures. The quickest route is to use the Matrix visual with values on the Columns shelf, or to unpivot/pivot in Power Query so each record is one row with many columns. This guide walks through both approaches, plus the formatting and troubleshooting you need for a clean, readable horizontal layout.

What You'll Need

  • Power BI Desktop (the free version is enough) or access to the Power BI service with edit rights.
  • A dataset loaded into your report — either imported or connected live.
  • Basic familiarity with the Fields pane and the Visualizations pane.
  • For the Power Query route: the same dataset, opened in the Power Query Editor.

Step-by-Step

  1. Decide what "horizontal" means for your report. A horizontal table usually means one row per entity (customer, product, month) with attributes spread across columns. If your source already has one row per entity, you may only need to format a Table visual. If your source is tall (one row per transaction), you will need to pivot.
  2. Load your data. In Power BI Desktop, go to Home > Get data, choose your source, and load it. If you are using a live connection, skip to step 4.
  3. Open the Power Query Editor by clicking Transform data on the Home ribbon. Labels can differ slightly by version and region.
  4. Pivot the column that should become your headers. Select the column whose values you want as column headers (for example, Month or Attribute), then go to Transform > Pivot Column. In the dialog, choose the Values column (the one holding the numbers or text you want in the cells) and confirm the aggregation (Sum, Count, Don't aggregate). Click OK.
  5. Check the result. You should now see one row per remaining identifier and one column per pivoted value. Rename columns if needed by double-clicking the header.
  6. Close and apply. Click Close & Apply on the Home ribbon to load the reshaped table back into the model.
  7. Add a Table visual. In the Report view, click the Table icon in the Visualizations pane. Drag your identifier field into the Rows area, then drag each attribute field into the Values area. They will appear as columns left to right.
  8. Alternatively, use a Matrix visual for a dynamic horizontal layout. Add a Matrix visual, put your row identifier in Rows, the field you want as column headers in Columns, and your measure in Values. This gives you a horizontal table that responds to slicers and filters.
  9. Format for readability. With the visual selected, open the Format pane. Under Grid, turn gridlines on or off. Under Column headers, adjust font size and alignment. Under Row headers, do the same. Use Wrap text under Values if long labels are being cut off.
  10. Control column widths. In a Table visual, drag the column borders in the visual itself, or use Format > Column headers > Auto-size to fit content. In a Matrix, widths adjust automatically but you can set a minimum via the Values formatting options.
  11. Sort and filter. Use the visual's header dropdowns to sort ascending or descending. Add slicers (for example, a date slicer) so the horizontal table stays interactive.
  12. Save and publish. Save the .pbix file, then use Home > Publish to send it to your workspace. The layout renders the same in the service.

Common Mistakes

  • Pivoting without an aggregation. If the Values column has duplicates for the same row-and-column combination, Power BI will either sum them or error. Decide deliberately whether to sum, average, or use Don't aggregate (which fails on duplicates).
  • Pivoting the wrong column. The column you pivot becomes the headers; the Values column supplies the cell contents. Swapping them produces a wide, unreadable table.
  • Leaving too many columns. A horizontal table with 40 columns is not readable on a dashboard. Limit to the fields your audience actually needs, or use a Matrix with drill-down.
  • Forgetting to rename pivoted columns. Power Query names new columns after the source values, which can be cryptic or contain spaces. Rename them before loading.
  • Using a Table visual when a Matrix is better. A Table cannot dynamically add columns based on slicer selection; a Matrix can. Choose based on whether the column set is fixed or variable.
  • Ignoring text wrapping. Long values get truncated in narrow columns. Turn on Wrap text or widen the column.

Tips

  • Use Power Query's Unpivot first if your source is already wide but messy, then re-pivot cleanly — it often produces a tidier model than pivoting raw data.
  • Name your pivoted columns with a consistent prefix (for example, Sales Jan, Sales Feb) so they sort predictably in the Fields pane.
  • For a true "one row per customer" horizontal view, build a Matrix with Customer in Rows and the attribute in Columns, then set Stepped layout off in Format > Row headers to flatten the look.
  • Use conditional formatting (Format > Cell elements > Font color or Background color) to highlight values in a horizontal table without adding extra columns.
  • If you need the table to export cleanly to Excel or CSV, prefer the Table visual over the Matrix; Matrix exports include the row hierarchy.
  • Test the visual at the smallest screen size your audience uses — horizontal tables are the first thing to break on mobile layouts.

Troubleshooting

  • The Pivot Column option is greyed out. Make sure you have selected a single column first, and that the query is not already pivoted. If the column contains nulls, filter them out before pivoting.
  • You get an error about duplicate values. Choose an aggregation in the Pivot Column dialog, or remove duplicates in the identifier column before pivoting.
  • Columns appear in the wrong order. In the Table visual, drag fields in the Values area into the order you want. In Power Query, reorder columns by dragging headers.
  • The table shows blank cells. This usually means the pivot produced no value for that combination. Decide whether blanks should show as zero — use Format > Values > Show blank as and set a value.
  • Formatting resets after refresh. Formatting is stored in the report, not the data, so it should persist. If it does not, check that you are editing the same visual and not a duplicate.
  • Publish shows a different layout. Clear your browser cache and re-open the report. If the issue persists, check that the dataset refresh completed successfully in the service.

Frequently Asked Questions

Can I make a table horizontal without Power Query?

Yes — use a Matrix visual with your identifier in Rows and the attribute you want as headers in Columns. This gives a horizontal layout without reshaping the data, though the column set is driven by the data rather than fixed.

What is the difference between a Table and a Matrix in Power BI?

A Table shows a flat list of columns you choose. A Matrix supports row and column hierarchies, subtotals, and drill-down, and can expand columns dynamically based on the data.

Why does my pivoted column show numbers instead of text?

Power Query infers the type from the Values column. If the source values are numeric, the pivoted columns will be numeric. Change the type in Power Query if you need text.

Can I export a horizontal table to Excel?

Yes, from the Power BI service you can export the underlying data of a visual (subject to permissions). The Table visual exports more cleanly than a Matrix because it has no row hierarchy.

Does a horizontal table update when the data refreshes?

A Matrix updates dynamically because columns are generated at render time. A pivoted table in Power Query updates only when the query refreshes, and new column values will not appear until you edit the query.

How do I stop columns from being cut off?

Turn on Wrap text in the Format pane under Values, or widen the column by dragging its border. In a Matrix, reduce the font size or hide less important columns.