Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Min(date) confusing..

I am trying to find the min "call time stamp" (CTS) for each user. But min(time stamp) doesn't seem to work as either an expression or a dimension (I figured the latter wouldn't, so I tried it again as "aggr(min(CTS),USER)"; that didn't work either.

MinCTS.PNG

Is there some special way to handle dates in the min and max functions? (I need to find max as well).

I'd actually like to do this in my LOAD script. Currently, it is:

OutSales:

LOAD

     Call time as CTS,

     caller id as USER,

     calllength as length

FROM (excelfile)

What am I missing here? thanks!

5 Replies
sunny_talwar

What if you try this:

=Aggr(Min(TOTAL OutSales.CTS), USER, OutSales.CTS)

Not applicable
Author

Sorry, still comes back as NULL..

I'm sure this has something to do with full time stamps, because aggr(min(date), something else) has worked for me in the past. But I need the hh:mm:ss part because I want to find the first and last call made each day.

I wondering if I should just add something like

LOAD

     frac(CTS) as hourstamp

find min(hourstamp)

and then just use date(hourstamp,'hh:mm:ss')  when I display it?

sunny_talwar

Can you share a sample to look at your issue?

Not applicable
Author

This is bizarre.. I added the line

frac(CTS) as hourstamp

to my script and reloaded. Now the table looks like this:

CTSnew.PNG

and I didn't change another thing. I seem to recall that date-times imported directly from excel have some issues, but can't remember the details.

sunny_talwar

Hahahaha cool, it seems that its working now, you just need Time() or TimeStamp() function around your expressions now