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

aggr function problem

Hi Experts,

I have below fields.  could any one help? 

employee, address, case no. distance. distance is the nearest distance by employee.

employeeaddresscase no.distance
1a15660.4
1a24543

i used aggr(distance, employee) and result is as below.

employeeaddresscase no.distance
1a24540.4

 my expected result as below in table chart.

employeeaddresscase no.distance
1a15660.4

 

2 Replies
lironbaram
Partner - Master III
Partner - Master III

hi

this expression should work for you 

if(distance=min(total<employee> distance),distance)
GraceGao
Creator
Creator
Author

Thanks but i have one problem, i found No.2 employees distance is zero, then 

how can i get the second nearest distance record when nearest distance is zero?