Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I'm making a monitor for our factory on which a supervisor can see if a certain activity has been done on time or not. To know if an item was on time or not I need to compare 2 timestamps from different tables with eachother, it then states of the item was on time or not - easy to make with a join and a calculated field.
However in the system every movement of an item gets a seperate timestamp and because of this every item has several different movements and different timestamps. This is causing issues for my monitor as I can only show every item once. I need Qlik to only count the latest timestamp of a certain reference as this is the final movement. I have been searching for days to find a solution but so far I have not been able to find anything that works... I am at the end of my knowledge and searching capabilities so I hope the great community here can help me out!
This is an example of the data which I currently receive:
Car Kit ID (Table 1 & 2 same column information) | Deadline Tact (Table1) | Physical Movement (Table2) | On Time? |
6141U411511 | 2/09/2019 8:21:00 | 2/09/2019 08:05:45 | YES |
0054530609U410031 | 2/09/2019 8:21:00 | 2/09/2019 8:50:51 | NO |
0054530609U410031 | 2/09/2019 8:21:00 | 2/09/2019 10:20:36 | NO |
0054530609U410041 | 2/09/2019 8:21:00 | 2/09/2019 7:20:23 | YES |
0054530609U410041 | 2/09/2019 8:21:00 | 2/09/2019 8:50:00 | NO |
0054530609U420011 | 2/09/2019 9:42:00 | 2/09/2019 9:32:02 | YES |
0054530609U420011 | 2/09/2019 9:42:00 | 2/09/2019 9:40:12 | YES |
The result I would like to get:
Car Kit ID (Table 1 & 2 same column information) | Deadline Tact (Table1) | Physical Movement (Table2) | On Time? |
6141U411511 | 2/09/2019 8:21:00 | 2/09/2019 08:05:45 | YES |
0054530609U410031 | 2/09/2019 8:21:00 | 2/09/2019 10:20:36 | NO |
0054530609U410041 | 2/09/2019 8:21:00 | 2/09/2019 9:50:00 | NO |
0054530609U420011 | 2/09/2019 9:42:00 | 2/09/2019 9:40:12 | YES |
Anybody wh
just inner join your table with max time
something like this
TABLE2_FINAL:
Load * from TABLE2;
inner join
Load max(Physical Movement) as Physical Movement,Car Kit ID from Table2 group by Car Kit ID ;
The message cut short so I'll add it here:
Anybody who can help me with this problem? I am getting a big headache because of this 🙂
Thanks in advance for your help!
Kind Regards,
Wouter
just inner join your table with max time
something like this
TABLE2_FINAL:
Load * from TABLE2;
inner join
Load max(Physical Movement) as Physical Movement,Car Kit ID from Table2 group by Car Kit ID ;
Really that simple ... thanks for the help!