How to Add Multiple Legends in Power BI
Trying to show multiple categories in a single Power BI visual can feel like a puzzle. You drag a second field into the Legend box, only for it to replace the first one. This experience is common, but it doesn't mean you can't get the chart you need. This tutorial will walk you through three effective, step-by-step methods to get the effect of multiple legends in your Power BI reports.
Why Can't You Just Add Multiple Legends?
Before jumping into the workarounds, it helps to understand why Power BI is designed this way. A legend's primary job is to split a single measure (like sales) into sub-categories. Adding a second, third, or fourth legend can quickly lead to a visual that's confusing and overloaded with colors. Power BI encourages clearer, more readable reports by limiting this by default.
However, there are many valid reasons to analyze your data by more than one category at a time. The good news is that Power BI provides powerful, flexible ways to do this - they just go by different names. Let's explore the best methods to achieve this granular level of analysis.
Method 1: Combine Categories with a DAX Calculated Column
The most direct way to create a multi-category legend is to combine them into a single, new column using a simple DAX (Data Analysis Expressions) formula. This technique, called concatenation, merges the text from two or more columns into one. This new, combined column can then be used in your visual's legend field.
When to use this method: When you need to see every unique combination of categories represented as a distinct entry in your legend. It's perfect for when you want a detailed breakdown in a single chart.
Example: Charting Sales by Product and Region
Imagine you have a sales table and you want to see sales broken down by both Product Category and Sales Region in the same bar or pie chart. You want to see distinct entries like "Electronics - North America" and "Apparel - Europe".
Step 1: Navigate to the Data View
In your Power BI report, click on the Data icon in the left-hand navigation pane to view your tables.
Step 2: Create a New Column
Select the table that contains the categories you want to combine (in this case, our 'Sales' table). In the ribbon at the top, click on New Column under the "Table tools" or "Column tools" tab.
Step 3: Write the DAX Concatenation Formula
A formula bar will appear above your data table. Here, you'll write a simple DAX expression to join your columns. The ampersand symbol (&) is used to combine text strings.
Enter the following formula:
Combined Legend = 'Sales'[Product Category] & " - " & 'Sales'[Region]
Combined Legend: This is the name we're giving our new column.
'Sales'[Product Category]: This references the Product Category column from our Sales table.&: The DAX operator that concatenates (joins) two text strings." - ": This adds a separator for readability. Without it, your legend would show entries like "ElectronicsNorth America". You can customize this with any separator you like (e.g., "|", ":", etc.).'Sales'[Region]: This references the Region column.
Press Enter. Power BI will instantly create the new column, populating it with combined values like "Electronics - Asia" for every row in your table.
Step 4: Use Your New Column in a Visual
Return to the Report view. Create a chart, such as a Clustered Column Chart.
Drag a measure, like Sales Amount, to the Y-axis.
Drag a field like Month to the X-axis.
Now, drag your new Combined Legend column into the Legend field well.
Your chart's legend will now display the combined categories, allowing you to easily compare performance across product A in region X versus product B in region Y, all in one place.
Method 2: Use "Small Multiples" for Clean Comparisons
Sometimes, cramming dozens of combinations into one legend makes it hard to read. A cleaner approach is to use Power BI’s Small Multiples feature. This creates a grid of smaller, individual charts, where each chart represents a different category. It splits your visual into multiple versions that are easy to compare side-by-side.
When to use this method: When your primary goal is to compare trends across one category (e.g., regions) while still seeing a secondary category breakdown (e.g., product types) within each chart.
Example: Comparing Monthly Sales Trends by Region
Let's use the same data. Instead of one clustered chart, we want to create separate line charts showing the sales trend for each region. We can still use the standard legend within each of these small charts.
Step 1: Create a Base Visual
Start by building the chart you want to replicate. For instance, create a Line Chart.
Add Month to the X-axis.
Add Sales Amount to the Y-axis.
Add Product Category to the Legend field.
Right now, this shows one line chart where different colored lines represent the different product categories.
Step 2: Add a Field to Small Multiples
Take the field you want to split the chart by (in our case, Region) from the Data pane, and drag it into the Small multiples field well in the Visualizations pane.
Step 3: Analyze the Result
Power BI instantly transforms your single line chart into a grid. You'll see one chart for "North America," one for "Europe," one for "Asia," and so on. Each chart maintains the same axes and the same legend (Product Category), making it incredibly easy to compare trends. You can quickly see if, for example, Electronics sales are spiking in Asia while remaining flat in Europe.
Formatting Tip: Customize the Grid Layout
You can control the layout of your small multiples. With the visual selected, navigate to the Format visual pane (the paintbrush icon). You'll find a 'Small multiples' section where you can adjust the number of rows and columns to best fit your report canvas.
Method 3: Create Interactive Dashboards with Hierarchies
A third option is to use hierarchies to create a drill-down experience. This doesn’t show multiple categories simultaneously but allows you and your users to interactively explore levels of data, which is often the underlying goal when asking for multiple legends.
When to use this method: When you want to provide layers of analysis, starting with a high-level overview and allowing users to "drill down" into the details that interest them. This is ideal for interactive reports.
Example: Drilling from Region Down to Product Category
We'll set up a bar chart that first shows sales by region. Then, with a click, a user can expand a single region to see the product category sales within it.
Step 1: Create a Hierarchy in Your Visual
Create a Clustered Column Chart. Drag your highest-level category, Region, to the X-axis field well. Then, drag your next-level category, Product Category, into the X-axis well directly beneath Region. Power BI automatically creates a hierarchy for this visual.
Step 2: Add Your Measure
Drag your measure, Sales Amount, to the Y-axis. Your chart will initially show sales just by Region.
Step 3: Enable and Use the Drill-Down Functionality
With the visual selected, you’ll see several small arrows appear in its top-right corner.
Turn on Drill Down: Click the single arrow pointing downwards. This icon activates "click to drill" mode.
Drill Down on a Point: Now, you can click on one of the bars in your chart (e.g., the "North America" bar). The chart will update to show you the sales data for the next level in the hierarchy - Product Category - but filtered only for North America.
Drill Up: Use the arrow pointing upwards to return to the higher-level view (Regions).
This method keeps your reports clean and empowers users to explore the data on their own terms, preventing information overload.
Final Thoughts
While Power BI doesn’t have a multi-legend drop-zone, it provides superior ways to handle multi-category analysis. Whether you choose the directness of a DAX calculated column, the comparative clarity of small multiples, or the interactive exploration of hierarchies, you can build rich, insightful reports that go beyond a basic chart.
Wrestling with report settings, writing DAX formulas, and configuring visuals can take valuable time away from analysis. We found this friction so common that we built Graphed to be the solution. Instead of manual setup, you can simply describe what you need with conversational language and get your dashboard in seconds. A prompt like "create three line charts showing US traffic, Canada traffic, and UK traffic from Google Analytics" instantly builds a small multiple view for you, no dragging-and-dropping required.