Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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?

1 Solution

Accepted Solutions
Highlighted
Specialist III
Specialist III

Hi,

Try with

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

View solution in original post

2 Replies
Highlighted
Specialist III
Specialist III

Hi,

Try with

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

View solution in original post

Highlighted
Creator
Creator

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))