Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
raadwiptec
Creator II
Creator II

days

Iam looking for a logic in the script where I can report the contractors coming back in every 40 days after the contract end date, The following is my table

DeptID | ContracttorID | ContractStartDate | ContractEndDate

10 | 9009|01/02/2019|01/05/2019

40 | 9012|01/03/2019|01/06/2019

10 | 9008|01/02/2019|01/04/2019

Labels (1)
3 Replies
Anil_Babu_Samineni

Perhaps this?

If(ContractEndDate>=Date(ContractEndDate+40,'DD/MM/YYYY'), ContracttorID)

Or

If(ContractEndDate>= Max(TOTAL <ContractEndDate> ContractEndDate) and ContractEndDate<=Date(ContractEndDate+40,'DD/MM/YYYY'), ContracttorID)

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
raadwiptec
Creator II
Creator II
Author

thanks anil, in case if the same contractor comes in already..should we be using peek function or the same logic will work?

DeptID | ContracttorID | ContractStartDate | ContractEndDate

10 | 9009|01/02/2019|01/05/2019

40 | 9012|01/03/2019|01/06/2019

10 | 9008|01/02/2019|01/04/2019

10 | 9009|04/05/2019|04/08/2019

Anil_Babu_Samineni

Perhaps this?

If(ContractEndDate>=Date(ContractEndDate+40,'DD/MM/YYYY') and ContracttorID = Peek(ContracttorID), ContracttorID)

Or

If((ContractEndDate>= Max(TOTAL <ContractEndDate> ContractEndDate) and ContractEndDate<=Date(ContractEndDate+40,'DD/MM/YYYY')) and ContracttorID = Above(ContracttorID), ContracttorID)

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