• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Stacked Bar chart + another bar on secondary axis & how to link primary-secondary axis numbers

BostKlem

New Member
Hi

I'd like to get your help on this ...
I have a table with the data per quarter and I created a stacked bar chart with that data.
Now, I'd like to add another bar next to those stacked bars that will show YTD (year-to-date) data.
I tried doing it with secondary axis but all I could do is use a line.
Is there a way to do what I want? If so, I'm eager to learn it.

I'm attaching a file with the table and the proposed chart - I put my expectation in a blue bar.

The second question I have relates to the scales of primary and secondary axis - is there a way to "lock" them so that when the primary changes, the secondary changes, too?

Thanks,
Bostjan
 

Attachments

BostKlem

New Member
Hi, thank you for this example on 1) - if there's no better I'll use this one but what I was also trying to have the value of YTD there and in your example one can't do that, right? It would not be seen as it would be overlapping which means I'd have to manually edit the labels every time, right?

Is there a way to shift the YTD bar to either left or right?

For 2), can you give me some hints on it and I'll work on VBA myself, please?

Thanks!
 
Top