9 Replies Latest reply on Dec 5, 2018 1:38 PM by Caireen Zaina

# Can i create a side-by-side bar graph - with two moving calculations ?

Hi Tableau Community,

I am having trouble with what could be a simple answer.

I am trying to create a side-by-side bar graph that has two 12mth moving calculations - i have no problem doing these separately - but can not think of a way to get a side-by-side graph.

I need it to look similar to the below. I have attached my package workbook and if anyone could help the RS PFAT tab - it would be really appreciated.

Thanks in advance for you help.

• ###### 1. Re: Can i create a side-by-side bar graph - with two moving calculations ?

1 of 1 people found this helpful
• ###### 2. Re: Can i create a side-by-side bar graph - with two moving calculations ?

Thank you Amit,

This looks exactly what I am after - however the workbook isn't attached - just the screenshot of what you have done. So I am none the wiser at the moment.
I will see if I can figure it out though.

Kind Regards

Caireen

• ###### 3. Re: Can i create a side-by-side bar graph - with two moving calculations ?

Caireen,

The workbook is there in the Forum thread, not viewable in email:

• ###### 4. Re: Can i create a side-by-side bar graph - with two moving calculations ?

Oh - sorry - thanks I shall go find it

• ###### 5. Re: Can i create a side-by-side bar graph - with two moving calculations ?

Thank you so much Amit.

Could you explain the calculation for me - the -5 and +5 on my two measures?

Cheers

Caireen

• ###### 6. Re: Can i create a side-by-side bar graph - with two moving calculations ?

Caireen,

Sorry for jumping in, I just happen to be online.

I think Amit's method is just spacing the bars out,

a few days before and after the actual month start.

You can reduce the amount to say 2 if you feel

the lines look too phase shifted.

Here is a larger discussion on the subject:

• ###### 7. Re: Can i create a side-by-side bar graph - with two moving calculations ?

Thanks Swaroop,

That makes sense. I just couldn't get my head around the 5...

The continuous dates annoy me a bit as you get the blank dates (months) either end of the graph. and I am also struggling now to change my axis to % (which i have managed quite ok in the past)
Some of the quirky things within tableau I guess. :-)

• ###### 8. Re: Can i create a side-by-side bar graph - with two moving calculations ?

Caireen,

Yes, the extra space does happen with continuous dates:

Hide unused range in continuous date x-axis

not sure if there is a good resolution for that.

you can manually clip them off, but wouldn't be dynamic when new data comes in.

But the percentages should work. Please see workbook v10.5 attached in the Forum Thread.

1 of 1 people found this helpful
• ###### 9. Re: Can i create a side-by-side bar graph - with two moving calculations ?

I was using this axis and not the pane to try and edit!!!
Thanks

as for the blank date spots - not sure what I will do ...