Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am new to QlikView and have run into a problem with the following quest: we would like to create a visual graph that would show me the final location and time for a "flight". However I am having trouble getting the final "Location" on the dimension axis and the the "Days in location" on the Y axis. I can get a graph showing all locations but I only want the final location.
Trying things like aggr(max(Seq_no),Flight) would get me the last Seq_no but this won't work on Location.
Any help with this would be appreciated.
Regards,
Maarten
I have the following like data:
| Flight | Seq_no | Departure | Arrival | Location | 
| R526 | 1 | 27/03/2015 | 28/03/2015 | Berlin | 
| R123 | 1 | 28/03/2015 | 02/04/2015 | London | 
| R526 | 2 | 28/03/2015 | 02/04/2015 | Paris | 
| R897 | 1 | 29/03/2015 | 01/04/2015 | Madrid | 
| R465 | 1 | 01/04/2015 | 02/04/2015 | Amsterdam | 
| R897 | 2 | 01/04/2015 | 02/04/2015 | London | 
| R123 | 2 | 02/04/2015 | 04/04/2015 | Parris | 
| R526 | 3 | 02/04/2015 | 07/04/2015 | London | 
| R123 | 3 | 04/04/2015 | 05/04/2015 | NewYork | 
| R123 | 4 | 05/04/2015 | 09/04/2015 | Amsterdam | 
and am looking to get data table like:
| Flight | Final Location | Days in location | 
| R526 | London | 4 | 
| R123 | Amsterdam | 2 | 
| R897 | London | 9 | 
| R465 | Berlin | 9 | 
So I can plot a graph like this:
Maybe like
= aggr( FirstSortedValue(Location, -Seq_no), Flight)
= aggr( FirstSortedValue(Arrival-Departure, -Seq_no), Flight)
edit:
Or if you dimension is Flight, just the FirstSortedValue() functions as expressions.
Maybe like
= aggr( FirstSortedValue(Location, -Seq_no), Flight)
= aggr( FirstSortedValue(Arrival-Departure, -Seq_no), Flight)
edit:
Or if you dimension is Flight, just the FirstSortedValue() functions as expressions.