Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Expression in chart dimension

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:

FlightSeq_noDepartureArrivalLocation
R526127/03/201528/03/2015Berlin
R123128/03/201502/04/2015London
R526228/03/201502/04/2015Paris
R897129/03/201501/04/2015Madrid
R465101/04/201502/04/2015Amsterdam
R897201/04/201502/04/2015London
R123202/04/201504/04/2015Parris
R526302/04/201507/04/2015London
R123304/04/201505/04/2015NewYork
R123405/04/201509/04/2015Amsterdam

and am looking to get data table like:

FlightFinal LocationDays in location
R526London4
R123Amsterdam2
R897London9
R465Berlin9

So I can plot a graph like this:

flights.JPG

1 Solution

Accepted Solutions
swuehl
MVP
MVP

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.

View solution in original post

1 Reply
swuehl
MVP
MVP

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.