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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
abc_18
Creator II
Creator II

How to calculate date difference from current system date time, that is greater than one day

Hi,

I have a date field called 'Complain_datetime'.

Requirement is to get the count  of  complaint ID's, for which date difference with respect to current system date is greater thn 1 day.

How to achieve this, please suggest.

Regards

Labels (1)
2 Replies
Kushal_Chawda

Would you be able to share sample data ?

Meanwhile you can try below expression

 

=Count({<[complaint ID]={"=today()-Complain_datetime>1"}>}ID)

abc_18
Creator II
Creator II
Author

Hi Kush,

Thanks for your response, below expression suggested by you is working fine.

How to calculate the value in hours, I have some sla_time for each of the complains, and I have to calculate, if the time taken to resolve the complains in comparison with current date time is greater then sla_time.

Below is the expression I am using which gives me blank value.

Here Complain_datetime consist value like :- '01-04-2020 06:27:45' (changed the format in script itself)

if(round(avg(Interval(Now()-Complain_datetime,'hh')))>sla_time,count(comp_id))

 

Please suggest