Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
Newcolator
Helper II
Helper II

Line chart with 2 series on different axes and legend

Hello

 

I have two series I want to put on a line graph, but they have different scales so one of the series needs to be on the secondary y-axis. But my data also has a legend value that I want to use. I can do this in Excel with a pivot chart, see example below. But I can't seem to do this in Power BI; it won't let me put a value on both y-axes and add a legend, it just doesn't accept the columns when I drag them in. I'm using Version: 2.106.883.0 64-bit (June 2022). Is this feauture not available? Is this possible? I guess I could try pivoting the data in Power BI like I did in Excel, but then I'd have to label my columns with the year, which will need updating every new year, not ideal.

 

Newcolator_0-1674642040866.png

 

1 ACCEPTED SOLUTION
MAwwad
Solution Sage
Solution Sage

In Power BI, you can indeed have a series on the primary y-axis and another on the secondary y-axis and also use a legend.

However, in order to do this, you will need to create a new table with the data that you want to use for the line graph. This table should have columns for the x-axis values, the primary y-axis values, the secondary y-axis values, and the legend values. Once you have this table, you can then create a line chart and drag the columns for the x-axis, primary y-axis, and secondary y-axis into the corresponding fields in the visualizations pane.

Then, you can add the legend value by going to the Format pane, select the Data label and Select the column you want to use as legend.

View solution in original post

1 REPLY 1
MAwwad
Solution Sage
Solution Sage

In Power BI, you can indeed have a series on the primary y-axis and another on the secondary y-axis and also use a legend.

However, in order to do this, you will need to create a new table with the data that you want to use for the line graph. This table should have columns for the x-axis values, the primary y-axis values, the secondary y-axis values, and the legend values. Once you have this table, you can then create a line chart and drag the columns for the x-axis, primary y-axis, and secondary y-axis into the corresponding fields in the visualizations pane.

Then, you can add the legend value by going to the Format pane, select the Data label and Select the column you want to use as legend.

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.