Having stacked and unstacked bars in the same chart

Hello,

I have this graph that I can make either way stacked or unstacked

Stacked graph:
image

Unstacked graph:
image

It combines 2 questions:

  • Dark blue = Question 1 (year n-1)
  • Yellow & Orange = Question 2 (current year)

And I would like to achieve this result instead:
image

Whenever I merge both questions on a dashboard. The final visualisation decides either to stack all bars or unstack all bars.

Is it possible to stack only specific bars? If yes how? Maybe some kind of "complex" native query?
If not, do you have any tricks to achieve an alternative solution?

Thank you very much

Hi @Novaska
That's currently not possible:
https://github.com/metabase/metabase/issues/5416 - upvote by clicking :+1: on the first post

1 Like

@flamber

Thank you once again. Would something like this be possible?

Grey line would be : Question 1 (year n-1)
Purple and orange would be : Question 2 (current year)

@Novaska You cannot combine stacked with anything else. That is currently not possible.

1 Like

Someone helped me to achieve the kind of result I was looking for by changing the date format.

Instead of merging everything on monthname, date are now mm-yyyy which allows to split year -1 and current year then use an ordinal x-axis scale to sort it in the right order.

image

Result is:

image