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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Max value with only set analysis

Hi,

I am trying to get the city with the max timediff between two times (in script I use Interval(Scheduled_Time - Actual_Time as TimeDiff)) by using a set analysis with an Only-function. But I am getting an error with my expression:

=Only({$<TimeDiff={$(=max(TimeDiff))}>}City)

What I want to get is a textobject with the name of the city with the highest timediff.

Paris 00:07:00

Berlin 00:12:00

Amsterdam 00:03:00

Berlin 00:11:00

London 00:13:00

So, in this case I expect to see London as it as the highest timediff. How can I achieve this?

10 Replies
Anonymous
Not applicable
Author

That was the solution! Thank you!