Forum Discussion

skancharla's avatar
skancharla
Advocate II
9 years ago

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

  • sits's avatar
    sits
    Advocate 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?

  • 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"

  • Anonymous's avatar
    Anonymous
    Not 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.

    • GenoRockMdt's avatar
      GenoRockMdt
      Frequent 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!
    • Davidataylor102's avatar
      Davidataylor102
      New 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.

  • Anonymous's avatar
    Anonymous
    Not 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.

    • GenoRockMdt's avatar
      GenoRockMdt
      Frequent 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!

  • Anonymous's avatar
    Anonymous
    Not 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