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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Rajakumaranakash
Contributor II
Contributor II

Difference between the data of latest two dates

I want to get the data difference from latest 2 dates. For Example 

Name Date ID
Alex 20-02-2025 1
Richard 20-02-2025 2
Jeni 20-02-2025 3
Ani 20-02-2025 4
Angel 20-02-2025 5
Lucky 20-02-2025 6
Raj 20-02-2025 7
Alex 19-02-2025 1
Jeni 19-02-2025 3
Ani 19-02-2025 4
Angel 19-02-2025 5
Lucky 19-02-2025 6
Raj 19-02-2025 7
Tom 19-02-2025 8
Alex 18-02-2025 1
Jeni 18-02-2025 3
Ani 18-02-2025 4
Angel 18-02-2025 5
Lucky 18-02-2025 6
Raj 18-02-2025 7
Jerry 18-02-2025 9

 

I want to get the result as below.  

Newly Added Name
Richard

 

Removed Name
Tom

 

Can someone help on this?

 

Labels (4)
3 Replies
Chanty4u
MVP
MVP

Try this 

Concat(DISTINCT {<[Date]={"$(=Max(Date))"}> } Name, ', ') -

Concat(DISTINCT {<[Date]={"$(=Max({<[Date]={"<$(=Max(Date))"}>} Date))"}>} Name, ', '

)

morgankejerhag
Partner - Creator III
Partner - Creator III

I am not sure how you mean - Richard, which is only present in the last day (20th) is flagged as removed?

rubenmarin1

Hi, names added on last date that was not present in the previous to last date (Added?):

Concat({<ID=P({<Date={"$(=Date(Max(Date)))"}>} ID)-P({<Date={"$(=Date(Max(Date)-1))"}>} ID)>} Name, ', ')

Names present in the previous to last date that not exists on max date (Removed?):

Concat({<ID=P({<Date={"$(=Date(Max(Date)-1))"}>} ID)-P({<Date={"$(=Date(Max(Date)))"}>} ID)>} Name, ', ')