Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In the DB data table there are a number of date fields,each representing a date action. I would like to create a 'final date field' that picks the newest date from those date fields, by row. If I was using excel I would use =IF(SUM(H2:K2)=0,"",MAX(H2:K2)).
Next I would like to create another column that calculates the length of time from when a record was created against the 'final date field'. The created record field is timestamped but the others do not seem to be.
Simon,
In your case, it may be something like this:
interval(FinalDate-CreateDate, 'D hh:mm ') // format in days, hours, minutes
or, if you have to define final Date right here:
interval(rangemax(Date1,Date2,Date3)-CreateDate, 'D hh:mm ')
Regards,
Michael
PS: See examples in "help".
Simon,
Function rangemax(field1,field2,field3,...) is what you need to get the latest date from the different fields.
Lenngth of time will be the difference between the final date and the create date. Function interval() may be helpful.
Regards,
Michael
Michael
Thanks the rangemax makes sense. Also I can see how to create an expression
in a chart. But I am still fairly new to Qlikview and have not used the
function interval(), could you please give me an example to look at.
Regards
Simon
On 1 May 2012 17:03, "Michael Solomovich" <
Simon,
In your case, it may be something like this:
interval(FinalDate-CreateDate, 'D hh:mm ') // format in days, hours, minutes
or, if you have to define final Date right here:
interval(rangemax(Date1,Date2,Date3)-CreateDate, 'D hh:mm ')
Regards,
Michael
PS: See examples in "help".
Many thanks for the quick help.