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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
anseglko
Creator
Creator

KPI with highest expression value

I want to show the equipment name with the longest interval in a KPI.

 

My data looks like this:

IDEquipmentStartEnd
1311:45:2111:55:56
2211:49:1111:53:23
3512:01:2312:04:43

and so on.

I have counted the duration in minutes for each entry. I simply used =interval(end-start,'m'). Then I take the maximum of those with max(). 

Now in the KPI widget I want to show the name of the elevator with the longest interval time. How would I do that?

Labels (1)
1 Solution

Accepted Solutions
sergio0592
Specialist III
Specialist III

Hi,

Try with

=FirstSortedValue(Equipment,-Interval(End-Start))

View solution in original post

2 Replies
sergio0592
Specialist III
Specialist III

Hi,

Try with

=FirstSortedValue(Equipment,-Interval(End-Start))
anseglko
Creator
Creator
Author

Thank you Sergio! This worked. It was more simple than I thought.

What about if I want the Equipment with the highest average interval (per equipment)?

EDIT: Managed to solve myself with 

=FirstSortedValue(equipment,-aggr(avg(Interval(end-start)),equipment))