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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply

Dual or multiple Y axis on power bi column and line chart

Hi All,

 

I'm having some trouble in creating a primary and secondary Y axis on a power bi chart with year as legend.

Let's say I have a monthly data of cost and sales for two years.

Year

Month

Cost

Sales

2018

Month 1

1000

5000

2019

Month 1

1100

5050

2018

Month 2

1050

4500

2019

Month 2

1200

5100

 

I want to create a time series chart as below, showing the actual values by month and legend coloured by the year. And I want say cost on the  primary Y axis and sales on the secondary Y axis.

 
 

Picture1.png

This is a much simple chart to create in excel, but I'm having a hard time in finding a free power bi visual to create this. Any ideas or suggestions on this would really help!!

 
 

 

2 REPLIES 2
ibarrau
Super User
Super User

Hi, let's see. The combo charts work like this: The legend will only work for the bars. If you want to try something like that you have to create measures for each line. For example

  • Axis: Month
  • Legend: Year
  • Value: Cost
  • Line: two measures Sales2019 and Sales2020

That is how the chart works inside Power Bi. You can always try custom visuals like Amit suggests.

Hope that helps.


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

amitchandak
Super User
Super User

@MonicaDevaraju , In power bi legend, will work only for bar, not for the line.

You can check custom visual: https://appsource.microsoft.com/en-us/marketplace/apps?product=power-bi-visuals

 

Or create an idea:https://ideas.powerbi.com/ideas/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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