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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis

Hi Everyone,

I have EmployeeCode,GradeCode and Cal_Date fields,I want to find out employees Count who has same grade from last 3 years


Any suggestions would be greatly appreciated.


Regards,
P.Divya

1 Reply
tresesco
MVP
MVP

Something like:

Count({<EmployeeCode ={"=Count({<Cal_Date ={'>=$(=Date(AddYears(Max(Cal_Date ), -3))) <=$(=date(Max(Date)))'}>}Distinct GradeCode)=1 "}, Cal_Date ={'>=$(=Date(AddYears(Max(Cal_Date ), -3))) <=$(=date(Max(Date)))'}>}Distinct EmployeeCode)




Update: Include the same time set restriction in the inner count as well. Corrected few glitches as well.