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: 
Not applicable

calculating date difference

hi

i am trying to calculate the  difference from the last modified date to present date..(today) i have attach an image of the data table that i am using.. as an output i need to take a count of all the incidents that is in the "pending " state more than 10 days.. can some one plz help me with this really really would appreciate the help

thank you in advance Untitled.png

1 Solution

Accepted Solutions
jagannalla
Partner - Specialist III
Partner - Specialist III

=Count(If(Interval(Today()-S_Mod_Date,'D')>10 and Status='In Progress',IncidentID,Null()))

View solution in original post

14 Replies
MK_QSL
MVP
MVP

You can create a flag in your script and use SUM(Flag)

IF(Status = 'Pending' and Interval(Today() - [Modified Date],'DD') >= 10, 1, 0) as Flag

Not applicable
Author

=if((today()-LastModifiedDate)>10 and (status = 'pending'),1,0)

Not applicable
Author

hi sneha

my today date n the last modified date formats r different so will this function work??

Not applicable
Author

hi manish


my today date n the last modified date formats r different so will this function work??

Not applicable
Author

convert both dates to same format for comparision purpose

=if((timestamp(today())-timestamp(LastModifiedDate)>10  and status = pending),1,0)

jagannalla
Partner - Specialist III
Partner - Specialist III

Try to convert your date column into date format and then use the expression.

Not applicable
Author

i converted my date column in to the right format but i am still unable to get a count 😕

jagannalla
Partner - Specialist III
Partner - Specialist III

Can you attach sample file.

Not applicable
Author

i am sorry Jagan i can not attach the file due to official reasons but i have attached an image of the data table in that i have converted my last modified date in to the proper format... i need to take a count of all the incidents which is in the in progress state more than 10 days..

=if((today()-SMod_date)>10

this function might be right but how can i take a count ?? 😕Untitled.png