Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
It is my first time using this forum and I hope that my question will be clear enough.
As you can see on the table I have joined, I have 4 fields :
-Date
-Time
-Rack
-Reference
I have already managed to create a timestamp with my entries using the following:
Timestamp#(Date(Date)&' '& Time(Time),'MM/DD/YYYY hh:mm') as TMSTP
What I want to calculate is a duration for each reference : this duration should be the difference between the 1st time the reference is registered in the table and the 1st time the rack field is modified. As you can see on the attached table, all references are entered at first in a rack starting with 'A999**' Then the rack is modified and gets a different kind of number.
TO calculate this duration I have tried the following but it did not work :
Interval#(min({<Location-={'A999**'}>} TMSTP) - min (TMSTP))
The min(TMSPT) will always be the 1st entry of the reference in the table and the min({<Location-={'A999**'} TMSTP) is the st time the location is changed.
Do you guys have any idea to solve this one?
Thanks you very much
I wish you all a good day
Gilbert
May be
Interval(Min(TOTAL <Reference> DateTime) - Min(DateTime),'hh:mm')
or
Interval(Min(DateTime) - Min(TOTAL <Reference> DateTime),'hh:mm')
Interval#(min({<Rack-={'A999*'}>} TMSTP) - min (TMSTP))
Please see the attached
Thank you for your answer but I dont have access to other qlikview files...
Could you write your code in a text file please?
Thank you very much again
Script is below,
Data:
LOAD Date,
timestamp(Date+Time,'DD-MM-YYYY hh:mm:ss') as TMPST,
Time,
Rack,
Reference
FROM
[Inner Movements.xlsx]
(ooxml, embedded labels, table is RHECMULC797);
In front end create straight table
Dimensions:
Reference,
TMPST
Expression:
=interval(aggr(min({<Rack-={'A999*'}>}TMPST)- min(TMPST), Reference),'hh:mm:ss')
try if this returns the correct timestamp
min({1<Location-={'A999*'} TMSTP)
are you able to resolve the issue?