Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying ..... class(time(Date_D,2) as my time expression....but it is not showing AM and PM in format..
Thanks in Advance
Sid
You mean you want a condition to show only certain time-buckets and they should be displayed in a very special format then it might be better to use if-loops for defining the buckets or even better a pick(match()) like:
pick(match(hour(frac(Date_D)), 8,9,10,11,12,13,14,15),
'8 AM - 10 AM',
'8 AM - 10 AM',
'10 AM - 12 PM',
'10 AM - 12 PM',
....)
and then hiding NULL on these dimension.
- Marcus
Try something like this:
class(time(frac(Date_D), 'hh:mm:ss tt'), 1/24 * 2)
respectively reverse:
time(class(frac(Date_D), 1/24 * 2), 'hh:mm:ss tt')
- Marcus
Hi Marcus,
Thanks for you reply !!!
What I needed was like ....
Hour | frequency |
8 AM-10 AM | 20 |
10 AM-12PM | 19 |
12 PM - 2 PM | 21 |
2 PM-4 PM | 16 |
You mean you want a condition to show only certain time-buckets and they should be displayed in a very special format then it might be better to use if-loops for defining the buckets or even better a pick(match()) like:
pick(match(hour(frac(Date_D)), 8,9,10,11,12,13,14,15),
'8 AM - 10 AM',
'8 AM - 10 AM',
'10 AM - 12 PM',
'10 AM - 12 PM',
....)
and then hiding NULL on these dimension.
- Marcus
Thanks Marcus !!! you are a saviour !!!