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: 
Claudiu_Anghelescu
Specialist
Specialist

Interval between dates with variable condition

Hi,

I need a point, I want to calculate the interval between 2 dates for each ID.

For example I want to have the interval where Status=S1 and Status=S6, so 04/12/2019 - 06/12/2019.

table.png

But the status will be changed based on input variable.

 

A solution is to create a new Date field for each status in Load Script, but I want to sort out in a different way.

 

Thanks in advance!

To help community find solutions, please don't forget to mark as correct.
Labels (3)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

What about usin set analysis. 

See attached qvw file.

image.png

View solution in original post

3 Replies
PrashantSangle

what is your expected w.r.t above data data...
Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Vegar
MVP
MVP

What about usin set analysis. 

See attached qvw file.

image.png

Claudiu_Anghelescu
Specialist
Specialist
Author

The result is correct in the table but if I want to show it in a BarChart or TextBox, Only() is not working properly because aggregate at the lowest level.

To help community find solutions, please don't forget to mark as correct.