3 Replies Latest reply on Apr 6, 2018 9:50 AM by Galen Busch

# Calculation of some between hours.

Hello Tableau community,

i have a question concerning building sums.

I build a table which shows the hours of a date time dimension and then the number of records in each hour.

I would really like to visualize know the amount of the number of records regarding shifts. that means:

shift 1 (6-14): 36

shift 2 (15-22): 92

and so on.

is this possible to calculate and visualize?

because the total sum shows me the sum of all number of records concerning building. I just need the numbers within shift.

• ###### 1. Re: Calculation of some between hours.

Pl attach a workbook.

• ###### 2. Re: Calculation of some between hours.

Do you have a field in your table for the shift? If so, then you could just sum with Shift as your dimension.

• ###### 3. Re: Calculation of some between hours.

Sounds like you need to create bins -

[Calculation 1]:

if datepart('hour',[DateTime Field]) >=6 and  datepart('hour',[DateTime Field]) <=14 then '6-14'

elseif datepart('hour',[DateTime Field]) >=15 and  datepart('hour',[DateTime Field]) <=22 then '15-22'

end