Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need to calculate the difference in the dates...

Hi Team,

Not getting the difference in the dates, an corrections in the below??

IF

(CaseAge='>30',
count(if(CaseAge='>30' and STATUS_DESC='Service Request' AND
WildMatch(REGION,'*EAST*')AND((MakeDate(Year(today()),Month(today()),Day(today())))-(MakeDate(Year(INCIDENT_DATE),Month(INCIDENT_DATE),Day(INCIDENT_DATE)))) > 30 ,
IN_INCIDENT_NO)))

INCIDENT_DATE - format is MMDDYYYYHHMMSS

Regards,

Hassan

1 Reply
swuehl
MVP
MVP

If your INCIDENT_DATE has been interpreted correctly as date / timestamp by QV, you don't need the makedate() function (and for sure not with today()).

Please read this blog post and the referenced technical brief:

http://community.qlik.com/blogs/qlikviewdesignblog/2012/06/07/get-the-dates-right

Then, you might have an issue, if CaseAge is ambiguous in the scope you are evaluating the expression.

To tell more, you should tell us how your data (model) looks like.

In general, it's much easier for us if you could post a small sample app or some sample data, together with your expected result.