Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a question regarding timestamp.
How can i group the time into 1 hour slot?
I may have data at
9.01am
9.02am
.....
9.55am
10.00am
...
10.45am
11am
...
In this case, i would like to have a new column with the new timestamps
9am
10am
11am
thanks!
Thanks. I dont know why, but
Date(Date('9.11 PM', 'hh.mm tt'),'hh tt')
seems to work instead. i have added this to my calculated dimension.
check out the interval match function and using mapping table for the solution.
Hi,
Try this one.
=Date(Date#('9.11 PM', 'hh.mm tt'),'hh tt')
Add your load script below mentioned syntex
Date(Date#(FieldName, 'hh.mm tt'),'hh tt') as [New Time]
Thanks. I dont know why, but
Date(Date('9.11 PM', 'hh.mm tt'),'hh tt')
seems to work instead. i have added this to my calculated dimension.
But now i have another question, does it just format? I would like it to be a new field, so that when i chart, i can chart against this dimension. May i know how to do that?
or do i have to add this expression to the load script?
Hi,
This syntex i posted for just example. you don't need that. use second one. you got a result
try this this works fine according to your requirment.
hope this helps you.
time1:
LOAD text(date(Date#(timefield,'hh.mmTT'),'hhTT')) as timenew,* INLINE [
timefield
9.01am
9.02am
9.03am
9.55am
10.00am
10.45am
11.00am
];
after i have added to the load script, when i chart a table, i have something like this.
21/01/2012 09 sum(field)
21/01/2012 09 sum(field)
21/01/2012 09 sum(field)
21/01/2012 09 sum(field)
21/01/2012 10 sum(field)
21/01/2012 10 sum(field)
21/01/2012 11 sum(field)
why wont qlikview recognise the 1st 4 views as a same dimension? how can i get
21/01/2012 09 sum(field)
21/01/2012 10 sum(field)
21/01/2012 11 sum(field)
thanks!
try this
Aggr(sum(field),numberfield)
here numberfield is the fieldname of your 2nd dimension.
can i have dynamic time slots based on user preference?