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: 
Not applicable

Finding first date in table

I have a table of sales reps, their customers, and the dates they met with the customers. A sales rep can meet a customer many times, e.g.

SalesRepCustomerMeeting Date
JackABC1/4/2012
JackABC

1/20/2012

JillXYZ

2/6/2012

JillXYZ2/7/2012
JackDEF1/11/2012

I want to find the first date each rep met with each customer. Eg. Jack, ABC, 1/4/2012, Jill, XYZ, 2/6/2012, Jack, DEF, 1/11/2012. I tried "min(meetingdate)", but it returns a value for each meeting. I tried firstsortedvalue(meetingdate,customer), but that didn't return anything (e.g. all results were "-"). Any thoughts?

2 Replies
Not applicable
Author

im not sure what youre trying to achive here,

but i think that if at data extraction phase you will do somthing like

'select distinct salesrep, customer, min(meeting date) from....'

it should work.... no?

Miguel_Angel_Baeyens

Hi,

Try ysing the function FirstSortedValue() and Min() to get the first date (lowest date) where the sales rep met the customer.

Hope that helps.

Miguel