Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
valpassos
Creator III
Creator III

Best date interval structure?

Hi community,

I have the following data with events (states) dates:

ProductIDFromStateToStateStartDateEndDate
2DraftAssigned01/01/202005/01/2020
2AssignedReview05/01/202007/01/2020
2ReviewCertification07/01/202008/01/2020
2CertificationApproved08/01/202010/01/2020


This is how have my data right now (after modeling). I want to be able to calculate the duration (days) in each state and I don't know if this is the right structure to be able to do that. The regular duration formula would be, for instance for the Review state:

 

INTERVAL(MAX({<FromState={Review}>} EndDate) - MIN({<FromState={Review}>} StartDate),'d')

 


(the states can repeat themselves)

I would have to do this for every state. Is this the optimal data structure for this type of requirement? Is this asking for an IntervalMatch?

Thanks in advance for your comments!

Lisa

Labels (2)
2 Replies
Ksrinivasan
Specialist
Specialist

hi,

you can use as given in measures, it will calculate how many days taken to complete the status,

Ksrinivasan_0-1597514748601.png

 

Usama
Creator
Creator

Hi,

Try this:

Backend:
 Num(StartDate) as Start_DateNum,

 Num(EndDate) as End_DateNum

Frontend:

End_DateNum - Start_DateNum

From Nothing - To Something - To Everything