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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Days between

Hi Friends,

I want to show the Days between 2 status (from below sample data).

Ex: for Status = 2, the days should be difference between min(Date) for Status = 2 and min(Date) for status = 3 (Which is next status to 2)

I thought the below formula would work but it is giving days between same status (say for status =2, I am getting days as 7)

NetWorkDays(min(Date), max(Date))

   

ContractDateStatus
22/24/20152
22/18/20152
22/23/20152
22/24/20152
23/6/20153

Any help will be appreciated.

Labels (1)
5 Replies
miguelbraga
Partner - Specialist III
Partner - Specialist III

Hi Anjan,

Why don't you use set analysis like this:

=min({$<Status = {'2'}> Date} ) - min({$<Status = {'3'}>} Date)

Regards,

MB

Mark_Little
Luminary
Luminary

Hi,

Give the below a try,

=NetWorkDays(Max({<Status={2}>}Date) ,Min({<Status={3}>}Date))

Mark

Not applicable
Author

Hi Miguel and Mark,

I just gave a subset of data. Actually my data has 1 to 10 status and my expression has to get the Days between status in the above specified way.

sunny_talwar
MVP
MVP

So you want to get difference between starting days for each of the statuses??? Do you only have information about a single contract? or do you have multiple contracts and each have 1 to 10 statuses?

maxgro
MVP
MVP

PFA

1.png