Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression: related to max

In an objects expression I want to display the last station for each train together with the timestamp. I am thinking about an expression as the following, but this one doesn't work:

IF([Train station Timestamp]=MAX([Train station Timestamp]),[Train station Name])

The itinerary table essentially looks as following:

TrainID, [Train station Timestamp], [Train station Name]

6531, Nov 1, 2009 23:56, Zwolle

6531, Nov 1, 2009 23:45 Assen

6531, Nov 1, 2009 23:22 Groningen

8924, Nov 1, 2009 14:23 Arnhem

8924, Nov 1, 2009 14:43 Utrecht

8924, Nov 1, 2009 15:05 Amsterdam

I want to do this in an objects expression where the dimension is the TrainID. I would prefer not to fall back on precalculating this in the script.

Anybody a suggestion?

Jochem

2 Replies
Not applicable
Author

You double-posted. In your other topic, I gave the answer.

You need you Max function to be:

Max(TOTAL <Train ID> [Train station Timestamp])


Not applicable
Author

I ended up doing it in the script. Thanks for the suggestion!