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

Display related field in Expression after an IF evaluation

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

1 Reply
Not applicable
Author

EDIT: Sorry, dollar sign-expansion is not needed. You probably need:

IF([Train station Timestamp]=MAX(TOTAL <[Train ID]> [Train station Timestamp]),
[Train station Name])