Multiple Axes Chart – When using a stacked bar and a Line in same visual

726 views
0

I’m using the Multiple Axes Chart and have 2 Values (one on Value Axis 1 and one on Value Axis 2).

I have a Legend configured and I have dates on the X axis.

Axis 1 is a stacked bar chart that is successfully breaking up in to separate stacked bars per Legend item as expected.

Axis 2 is a line.  That line has nothing to do with the Legend values in my case.

The out of the box “Line and stacked column chart” in Power BI handles that without an issue and does not attempt to slice the line value by the legend.

The Multiple Axes Chart though appears to be trying to slice the line values by the legend, and in my case that makes the line values incorrect because slicing the line’s measure by the legend values makes the measure calculation incorrect since we need only to see the line’s measure calculated once per date (the X axis values).  I can tell this is happening by looking at the Query that is visible in Performance Analyzer for both the out of the box visual and Multiple Axes visual and I see that the SUMMARIZECOLUMNS call in the out of the box visual includes only the Dates for its first parameter whereas the Multiple Axes visual includes both Dates and Legend.

Is there a way to work around the above issue?

Posted new comment

I was able to work around this my adding a new measure for the Axis 2 line that uses ALLSELECTED so that the legend gets explicitly ignored.

That wasn’t required with the out of the box Power BI visual but was for this one.