3 Replies Latest reply on Oct 22, 2018 12:49 AM by Patrick Weber

# Format interval of bar chart?

Hi Tableau friends.

In this attached work book I have values for each date time. Now I created bar charts.

My problem now e.g. the chart 7 hours: 7 includes all times from 7.00 to 7.59.

Is it possible to change the bar chart between 7 and 8? Or just change the label 7-> 7-8; 8-> 8-9; 9-> 9-10 etc.

Thanks for any hints.

• ###### 1. Re: Format interval of bar chart?

Hi Patrick,

Are you looking for this

Create hour calculation as

if DATEPART('hour',[Anlagezeit])=7 then '7-> 7-8'

elseif DATEPART('hour',[Anlagezeit])=8 then '8-> 8-9'

elseif DATEPART('hour',[Anlagezeit])=9 then '9-> 9-10'

elseif DATEPART('hour',[Anlagezeit])=10 then '10-> 10-11'

else '11-> 11-12'

END

Drag this into column.

thanks

sankar

• ###### 2. Re: Format interval of bar chart?

Yes that's what I looked for. Thanks.

• ###### 3. Re: Format interval of bar chart?

Is there also a way to show intervals even if there's no data available (see screenshot)?

I defined the intervals starting from 6h until 24h.