Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to Subtract 2 years from current year

Hello guys,

I would be thankful if you tell me the awnser ^^

I should to find the total of rookies in the company, So here the calculation :

new year= current year-2

if new year >= 2 , count PERSON_ID where PERSON_TYPE_ID={6}

please help me i couldn't found it

2 Replies
Anil_Babu_Samineni

May be this?

count ({<PERSON_TYPE_ID={6}, year={'$([new year])'}>} PERSON_ID)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Thank You very much ..

but may be i didn't explain my problem very well..!!

I have to count the total number of rokkies in the company so i have these data:

1- count({<PERSON_TYPE_ID={6}>}distinct PERSON_ID) .  (These for count Total employees)

2-  I should subtract from Current Date -2 

3- I should subtract Current date from Date Start  if the result >=2 then count it as rookies

DateStart-Current date >=2 ,Count ({<PERSON_TYPE_ID={6}>}distinct PERSON_ID)

How can I solve it  could you please help me!