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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculate the break between to dates

Hello Community,
i attached a qv-file, that shows my problem. I want to calculate the break between two dates (end and start date).
Best regards,
Aylin
1 Solution

Accepted Solutions
Not applicable
Author

I have to use the peek funtion and then i can subtract the right values. like

Load

Product,
date(Start) as Start
date(End) as End

if([Start]>peek('End'),[Start]-peek('End')) as break



Resident abc

order by Product,Start ;

View solution in original post

2 Replies
whiteline
Master II
Master II

Hi,

You can just subtract them.

=End-Start

Not applicable
Author

I have to use the peek funtion and then i can subtract the right values. like

Load

Product,
date(Start) as Start
date(End) as End

if([Start]>peek('End'),[Start]-peek('End')) as break



Resident abc

order by Product,Start ;