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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
hitha1512
Creator
Creator

Age Calculation

Hi Team,

I have a requirement to calculate the Age. 

Requirement - 

Compare field "Agreement Name" with last business days "Agreement Name" data. If new, then = 0, If was in the previous report, then +1 to the existing Days OLD count. If the agreement name drops off the report and appears the next day the count would restart from 0 again.

attaching raw data files and the results required.

Note : we receive daily files and there can be cases where we might not receive files 

thanks for your help in advance.

Regards,

Hitha Dhani

Labels (1)
11 Replies
hitha1512
Creator
Creator
Author

Fabulous ! thanks a ton for your quick response 🙂 Much appreciated !

hitha1512
Creator
Creator
Author

Hi Tresesco,

the below solution worked. but now i have been asked to exclude the Public holidays and weekends. please see my explanation below.

I receive excel files daily except on weekends and public holiday. so for these days i dont have the date populated in application.  

Please refer the attached screen shot. for 28/01/2020 the age expected is 1,  as 27th was public holiday and 25 and 26 were weekends. I do not have 25,26,27 populated in the dashboard. 

your code is checking for the previous day. 

-------Floor(valuation_date-Peek(valuation_date))=1,

what i want would be based on file. if the previous file that i received has the agreement name or not. 

would appreciate if you could help 🙂

Thanks & Regards,

Hitha Dhani