How to Create a Pivot Table in Power BI

Cody Schneider9 min read

If you're coming from the world of Excel, one of your first questions when opening Power BI is likely, "Where's the Pivot Table?" This powerful feature is the backbone of data analysis for millions, so it's only natural to look for its counterpart. While Power BI doesn't have an item called "Pivot Table," it has something even better: the Matrix visual. This article will guide you through creating and customizing a Power BI Matrix, showing you how it does everything an Excel Pivot Table can do and much more.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Why the Matrix Visual is Power BI's Pivot Table

In short, the Matrix visual is Power BI’s native equivalent of a pivot table. It’s designed to accomplish the same core task: summarizing a large dataset into a compact, organized table that aggregates data based on categories you define. Like a pivot table, a matrix lets you place fields into rows and columns, with the intersecting cells showing a calculated value (like a sum, count, or average).

For example, imagine you have a sales spreadsheet with thousands of rows. You want to see total sales revenue broken down by product category for each region. In Excel, you'd build a pivot table. In Power BI, you'll use a Matrix, putting "Product Category" in the rows, "Region" in the columns, and "Sales Amount" as the value. The result is an easy-to-read summary that turns dense data into clear information.

The key differences are interactivity and visual power. Power BI's Matrix allows for cross-filtering with other visuals, powerful drill-down capabilities, and dynamic conditional formatting that’s much more intuitive than in Excel.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 1: Preparing Your Data for Analysis

Before you can build an effective matrix, your data needs to be in good shape. Great reports are built on a foundation of clean, well-structured data.

In Power BI, this preparation work often happens in the Power Query Editor. When you import your data (from an Excel file, a database, or another source), make sure it follows a few basic principles:

  • Use a Tabular Format: Your data should be organized in rows and columns, where each row represents a single record (like a sale or a customer sign-up) and each column represents an attribute (like Date, Customer Name, Product, or Price). Avoid merged cells or extraneous summary rows in your source file.
  • Have Clear Column Headers: Make sure every column has a descriptive header (e.g., "Region," "OrderDate," "TotalSales"). These headers become the field names you'll use to build your matrix.
  • Check Your Data Types: Power BI is usually smart about assigning data types, but it's good practice to double-check. Numbers you want to sum or average should be a number type (like Decimal Number or Whole Number). Dates should be a Date or Date/Time type to enable time-based analysis. You can easily change this in Power Query. A numeric "Sales" column incorrectly identified as "Text" won't be able to be summed up in your matrix.

Taking a few moments to clean your data upfront will save you hours of frustration later. A clean dataset means your Matrix visual will work seamlessly.

Step 2: Building Your First Power BI Matrix (Pivot Table)

Once your data is loaded into Power BI, creating the matrix is a straightforward drag-and-drop process. Let's walk through it using our sales data example.

1. Add the Matrix Visual to Your Report Canvas

In the Power BI Desktop report view, look at the Visualizations pane on the right-hand side. Find the icon for the Matrix visual - it looks like a blue table with headers for rows and columns. Click it to add an empty matrix container to your report canvas.

2. Drag and Drop Your Fields

With the empty matrix selected, you'll see several "wells" or fields in the Visualizations pane: Rows, Columns, and Values. This is where you tell Power BI how to structure your pivot table.

  • Rows: From your Data pane (which lists all your tables and columns), find the field you want to use for your row headers. Let's use Product Category. Drag it from the Data pane and drop it into the Rows well. You'll immediately see your matrix populate with a unique list of all your product categories.
  • Columns: Next, decide what you want to see across the top of your table. We'll use Region. Drag the Region field into the Columns well. Now your matrix shows product categories down the side and regions across the top.
  • Values: Finally, you need to tell the matrix what data to calculate and display in the cells. We want to see total sales, so we'll drag the Sales Amount field into the Values well.

Just like that, you have a fully functional pivot table! Power BI automatically sums the Sales Amount for each intersection. If you want a different calculation, like an average or a count, simply click the small down-arrow on the field in the Values well and select a different aggregation.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 3: Taking Your Matrix to the Next Level

Building the basic matrix is just the start. Power BI offers amazing features to make your pivot table more insightful and interactive.

Adding Hierarchies and Drill-Downs

This is where Power BI really shines compared to a standard Excel pivot table. You can add multiple levels of detail for users to explore. For instance, what if you want to see the specific Sub-Categories within each Product Category?

It's easy: just drag the Sub-Category field from the Data pane and drop it into the Rows well, right underneath Product Category. Now, you’ll see small plus signs (+) next to each category name. Clicking one expands it to show the sales for all sub-categories within it. This drill-down capability lets your audience start with a high-level overview and dig into the details that interest them without needing a separate table.

You can do the same for columns as well! Add a Country field under Region to let users drill down from a continent to a specific country.

Formatting and Styling Your Matrix

A well-formatted table is easier to read and understand. With your matrix selected, click on the paintbrush icon in the Visualizations pane ("Format your visual") to access a host of styling options.

Here are a few popular formatting adjustments:

  • Style presets: Under "Visual" > "Style presets," you can choose a pre-made theme like "Minimal," "Bold header," or "Alternating rows" to quickly change the look and feel.
  • Grid options: Control horizontal and vertical gridlines, adjusting their color and width to improve readability.
  • Column and Row Headers: Change the font size, color, and background of your headers to make them stand out.
  • Values: Adjust the formatting for the data in your cells, including font size and color. You can also set "Display units" to show large numbers as thousands (K), millions (M), or billions (B) automatically.
  • Subtotals and Grand Totals: Easily turn row and column subtotals and grand totals on or off and customize their labels and formatting.
GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Using Conditional Formatting

Conditional formatting helps you instantly spot trends, outliers, and important data points. Instead of just showing numbers, you can bring your matrix to life with colors, bars, and icons.

Right-click the numeric field in the Values well (e.g., Sales Amount) and select "Conditional formatting." From here, you can choose from several options:

  • Background color: Apply a color scale (a "heat map") where lower values might be light red and higher values dark green. This makes it instantly obvious which regions or products are performing best.
  • Data bars: This adds a small bar chart inside each cell, giving you a visual sense of magnitude for each number relative to the others.
  • Icons: Add visual indicators like traffic lights (red, yellow, green) or arrows based on specific rules you define (e.g., green checkmark for sales above goal, red 'X' for below).

This feature transforms your matrix from a static table of numbers into a dynamic analytical tool.

Tips for Effective Pivot Tables in Power BI

  • Start Simple, Then Add Detail. Your first view should be a high-level summary. Use hierarchies and drill-downs to allow users to explore the more granular data as needed, rather than overwhelming them with a gigantic, cluttered table upfront.
  • Let Formatting Guide the Eye. Use bold headers, subtle background colors, and conditional formatting to draw attention to the most important parts of your table. The goal is to make the insights findable in seconds.
  • Rename Fields for Readability. When you drop a field into a well, Power BI might default to a name like "Sum of Sales Amount." You can easily rename this by double-clicking it in the Visualizations pane. Change it to something clearer, like "Total Revenue" or "Units Sold."
  • Combine Your Matrix with Other Visuals. The magic of Power BI is its interactivity. Place a matrix next to a bar chart and a map. When you click a row in your matrix (e.g., the "Electronics" category), the other visuals on the page will automatically filter to show data just for electronics.

Final Thoughts

By mastering the Matrix visual, you bring the analytical power of Excel's Pivot Table directly into your interactive Power BI reports. The ability to quickly summarize data, add drill-down hierarchies, and apply targeted conditional formatting allows you to build sophisticated reports that reveal insights hiding in your data.

As valuable as these skills are, the process of importing, cleaning, and manually building reports in tools like Power BI can still feel time-consuming, especially with the steep learning curve. At Graphed, we're simplifying this entire workflow. We allow you to connect your marketing and sales data sources and create entire real-time dashboards just by asking questions in plain English - no dragging, dropping, or visual configuration needed. Instead of building the report, you can describe it, and let our AI handle the rest, turning hours of work into seconds.

Try Graphed

Related Articles

How to Enable Data Analysis in Excel

Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!