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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Mahamed_Qlik
Specialist
Specialist

Latest record

Hi 

I want to display latest record based on P_Date.

Emp_ID   DEPT SECTION P_DATE
101   DEPT1 S1 2/12/2022
101   DEPT2 S2 2/13/2022
101   DEPT3 S3 1/13/2022
102   DEPT4 S4 4/14/2022
102   DEPT5 S4 4/13/2022


I want to display only below records

101   DEPT2 S2 2/13/2022
102   DEPT4 S4 4/14/2022

 

I have used below expression in set analysis, it is working fine if I am selecting specific Emp_ID
but I want to display latest records by default in table object 

if(GetSelectedCount(Emp_ID)>0, Count({< P_DATE={"$(=Date(Max(Aggr(if (P_DATE<=Max(McalDate), P_DATE),
P_DATE)),'MM/DD/YYYY'))"}>} distinct Emp_ID),
Count(distinct Emp_ID))

 

Kindly help. 


Labels (1)
1 Reply
PrashantSangle

Try below

Dimension > EMP_ID,  DEPT, SECTION

Measure > Aggr(max(P_DATE),EMP_ID)

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂