Forum Discussion
Dual Y axis in Line chart
Hi,
I'm working on a line chart and displaying 2 columns Project count and test count. Project count is in tens of number and test count in thousands.With a single Y axis ,the Project line almost looks flat.
Is there any option to have a second Y axis. I see that this option is there in Line and stacked column chart.
But we want to have the columns projection as 2 lines and looking for it in Line chart. Please help.
Thanks.
18 Replies
- sitsAdvocate I
Well done Power BI. You're supposed to act as a SQL Server front-end, yet, Excel has more functionality for visualisation. Why do you even exist?
- sagunaseNew Member
Actually Option is there and I managed to find it after bit of playing ... yes it's not obvious.
Improtnant thing is you will not see the option as you have to scroll down to see it; after expanding the arrow Under Y-Axis (Column). Hope this helps.
Instruction here : https://powerbi.microsoft.com/en-us/documentation/powerbi-service-tutorial-combo-chart-merge-visualizations/#see-also
- evang550Microsoft Employee
That's not what people are trying to solve for. We need to be able to plot 1 measure on the primary axis and another on the secondary.
- BeemerBumAdvocate I
I also throw my dis-affection regarding the lack of visual support for complex (or not so complex) data. PowerBI needs to at the LEAST parallel Excel for graphs and visuals. The expecation would be that PowerBI would exceed the Excel capabilties "out of the box"
- SteveCampbellMemorable Member
I know this is old but anyone still looking, but this blog explains how to create dual y-axis chart, and has a link to the finished visual:
https://powerbi.tips/2019/09/dual-y-axis-line-chart/
Appreciate your Kudos
Connect with me!- nagoorHelper III
Really helpful..
Thanks to your efforts.
- AnonymousNot applicable
I can't agree more. Power BI is meant for finding trends in data etc, how are you meant to find a trend if you can't compare 2 different types of data??
I spoke to Power BI and they said I could go to one of their partners and pay them to make a custom visualisation for me. If I am paying this much for Power BI, shouldn't I expect it would do something simple as this (look at how google charts does it, its simple as and you can add more than 2).
The way to implement this (especially more than 2) would be to have the name and values in the y axis for which ever line you hover over.
- GenoRockMdtFrequent Visitor
Not sure when it was added but the Line and Clustered Column Chart visual has the ability to define 2 Y axes.
Seems to work as expected when I show all my data unfiltered.
When I apply certain filter values, the left Y axis disappears... Apparently, there are some values that don't compute somehow for the axis. I did some troubleshooting and determined that the left y axis in my case is for the lines and 2 of the line series values rely on DAX Percentile function. I tried to capture any error condition on the dax formula so it now looks like:
P90Value = IFERROR(PERCENTILE.INC(tx_vEvents[eKpiNotifyAge],.9) , 0 )But the Y axis still disappears under certain (but not all) filters.Please advise Microsoft - thanks!
- Greg_DecklerCommunity Champion
Probably need to look at a custom visual or R visual.
- tbfrancisNew Member
I sahre your frustration! There is even a tutorial on how to do it, but the option is not present on my version. I wonder if this will be in the next release?
- Davidataylor102New Member
Frustrated about this here too. It's super simple in Excel but non-existent in Power BI. Doesn't make any sense to me.
- rdawoudRegular Visitor
you can use 'Power KPI' visual
http://www.cittabase.com/blog/power-bi-tips-dual-y-axis-in-area-and-line-chart/
- AnonymousNot applicable
I have an issue with the secondary Y-axis data labels. I am trying to figure out a way to turn off the data labels on the secondary y axis line chart. That option probably doesn't exist but having data labels on the secondary y axis makes my graph look super busy.
- GenoRockMdtFrequent Visitor
Guessing that you mean "having data labels on the series elements that relate to the secondary axis"? the whole idea behind adding a secondary axis is to show the scale of those series elements that have a different scale from the primary. You can of course selectively show labels on the various Series elements (Line and clustered column chart--Data Labels--Customize Series). Unlike Excel though, you can't format each data point.
Hope this helps!
- AnonymousNot applicable
Hi skancharla ,
You can use a custom visual like below for dual Y-Axis in a line chart.Dual Y axis in Line chart with PBIVizEdit.comDual Y axis in Line chart with PBIVizEdit.com
Download link on this page
https://pbivizedit.com/gallery/dual-y-axis-line-chart
This was made with our Custom Visual creator tool PBIVizEdit.com. With this tool,
- anyone, irrespective of technical skills, can create their own visuals
- 15 minutes to create a visual from scratch
- opens up many additional attributes to edit (for e.g. labels, tooltips, legends position, etc)
Give this a shot and let us know if you face any problems/errors.
You can use the editor to modify your visual further (some modifications cannot be done in Power BI window and have to be in the editor).
Thanks,Team PBIVizEdit