cancel
Showing results for 
Search instead for 
Did you mean: 

Cross tab with a row for every 4 hours ??

Former Member
0 Kudos

Hi,

I need to have a cross tab that shows total of checks for every four hour, on its option I could only find for every hours. Any idea on how I could get a row for each 4 hours from 00:00:00 of each day? I use crystal XI

Many thanks,

Andreia

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You will need to create your own grouping formula.

For the purpose of this discussion the formula name is for example if hour({DATE-TIME}) in [1,4] then 1 else if hour({DATE-TIME}) in [5,8] then 2 else if hour({DATE-TIME}) in [9,12] then 3 else if hour({DATE-TIME}) in [13,17] then 4 else if hour({DATE-TIME}) in [18,21] then 5 else if hour({DATE-TIME}) in [22,00] then 6 you then group off this formula. Your group names will be 1, 2, 3, 4, 5, 6 if you want those names to be more meaningfull then write a second formula. For the purpose of this discussion the formula name is if = 1 then "00:00 to 04:00" else

if = 2 then "05:00 to 08:00" else (etc....)

you can then change the group, and select options, select use a formula as group name, then select the formula 4hourname

Former Member
0 Kudos

Hi,

I tried the first formula, but came a msg saying that the then is missing and pointing to the coma between 1,4.

Any idea?

Thanks

Former Member
0 Kudos

Sorry I did not notice this but the forum did not print the brackets.

in [1,4]

just in case that didn't work

just to the right of the p key and left of the vertical bar are the brackets and braces

The numbers should be inside brackets. leftbracket 1,4 rightbracket

Former Member
0 Kudos

Yup that was it. I used a real left bracket her [[[[ ( actualy 4 of them, and it does not print when you press enter,

although I do see the brackets in the preview.

Maybe if I quote them.

"[" 1,4 "]"

Former Member
0 Kudos

Ok, so the 4 brackets showed up.... Make me a liar.

{} in [[1,4]]

Former Member
0 Kudos

Thanks very much! the only thing I changed was the range, instead of [1,4] I changed to [1 to 4] a nd so on.

Many Thanks,

Andreia

Answers (0)