Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Keep last record per date, per person

Hello, I am having a little trouble filtering my data.. I have titles for employees by month. If someone's title changes in a certain month, I want only one of the records ( I don't care if it's the first or the second). I can't seem to figure out how to do this. Below is a screenshot of what I am referring to.

Thank you!

Qlik Question.PNG

1 Solution

Accepted Solutions
sunny_talwar

May be like this:

LOAD Accounting_End_Date,

          Timekeeper_Initials,

          MaxString(Hist_Title) as Hist_Title

FROM....

Group By Accounting_End_Date, Timekeeper_Initials;

View solution in original post

6 Replies
sunny_talwar

Are you looking for this in the script?

Not applicable
Author

Yes.

sunny_talwar

May be like this:

LOAD Accounting_End_Date,

          Timekeeper_Initials,

          MaxString(Hist_Title) as Hist_Title

FROM....

Group By Accounting_End_Date, Timekeeper_Initials;

Gysbert_Wassenaar

Try the FirstValue or LastValue function:

LOAD

     Accounting_End_Date,

     Timekeeper_initials,

     FirstValue(Hist_Title) as Hist_Title

FROM

     ...

GROUP BY

     Accounting_End_Date,

     Timekeeper_initials

     ;


talk is cheap, supply exceeds demand
Not applicable
Author

That worked! Thank you!

Not applicable
Author

This also worked. Thank you very much!