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

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
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
MVP
MVP

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

Are you looking for this in the script?

Not applicable
Author

Yes.

sunny_talwar
MVP
MVP

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
Partner - Champion III
Partner - Champion III

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!