Forum Discussion
Line And Stacked Column Chart With Lines On Both Axes
I have a Line And Stacked Column chart where I have the stacked bars using the left axis and the line using the right axis:
I want to also add a goal line of 10 to this chart where the goal line shares the same left axis as the bars. If I were to make a second chart that just has the goal line, it would look like this with both the bars and the line sharing the left axis:
The final result I'm looking for is something like this:
I am aware that I cannot use the Analytics features to add a reference line like I can with a regular line chart or bar chart. I also tried overlaying the two charts and giving the top chart a transparent background. This looks ok with no selections made, but when I start making selections they start to get misaligned. Also when I try this method the legend marker from the bottom chart still shows up behind the text of the legend in the top chart:
Are there any other options for a stacked bar chart to include two lines; one that uses the right axis and one that shares the left axis with the stacked bars?
4 Replies
- SteveCampbell
Memorable Member
Could you make the goal a measure and include it in the line values field
- AnonymousNot applicable
The issue is that the goal is a different scale than the other line. When I add both lines at the same time, it puts both of them on the same axis. What I really want is that goal to be associated with the left axis because it's the goal for the bars not the goal for the line.
- negi007
Community Champion
Anonymous You might need to create your own custom visual to achive this task. Below links might help you in customizing visuals
https://radacad.com/custom-visual-for-power-bi-different-approches