Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
rustyfishbones
Master II
Master II

Time Expression, Start Time-End Time

Hi All,

I have an issue trying to calculate time for a task to be complete.If I have a picktime of 301 seconds or more, I need to reduce the picktime to 300 seconds.

Also, Is it possible to create something in the Script Editor, so if the EndPreviousTime is greater than 300 seconds (or 5 minutes) to the Start Time, I want to create a new EndPreviousTime.

So if you see below Example, on line 4 of the tablebox, you can see there is a Picktime of 2284 seconds since the previous end time, as this is over the 300 seconds I want to change the EndPreviousTime. So in below example my new EndPreviousTime would be 01:50:46 instead of 01:17:40.

2014-02-24_1500_001.png

1 Solution

Accepted Solutions
Not applicable

Alan,

If you want to modify the field directly in the table, you may use Rangemin, rangemax ....

Recomputed End Previous Time:  time(rangemax(EndPreviousTime, EndTime-Rangemin(Duration, '00:05:00')))

Recomputed Duration : time(rangemin(Duration, '00:05:00'))

Fabrice

View solution in original post

4 Replies
Not applicable

Alan,

If you want to modify the field directly in the table, you may use Rangemin, rangemax ....

Recomputed End Previous Time:  time(rangemax(EndPreviousTime, EndTime-Rangemin(Duration, '00:05:00')))

Recomputed Duration : time(rangemin(Duration, '00:05:00'))

Fabrice

rustyfishbones
Master II
Master II
Author

AUNEZ,

That works great as an expression in the chart.And I could use this!

Can I use Rangemax and Rangemin in the Script Editor?

The reason I would like to do this in the Script Editor is that I need to show headline numbers of Durations in text objects etc...

Not applicable

Alan,

These functions work also in script (like rangesum ....)

Fabrice

rustyfishbones
Master II
Master II
Author

Thanks AUNEZ,

The same expression can be used in the Script Editor

2014-02-24_1606.png

Thanks so much

Regards

Alan