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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
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 ;