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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Number of days between two dates

Hello,


I have a table by customer and date of order and I would like to know for each client the time between his first order and his second, the second and the third and the third and more Could you help me? I tried to use the interval function but the result is not good


the result must be the following and an example is attached

delay.JPG


Thank you for your help



1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hello,

finally, I found my answer using the interval function and the minimum


= sum(aggr(Interval(  min(  [Date Commande],2)-min(   [date],1),'D'),[Customer]))/count(distinct([Customer])

View solution in original post

3 Replies
trdandamudi
Master II
Master II

May be as below:

Anonymous
Not applicable
Author

thanks  not exactly because I need only synthesis for each step as in the following example for switching to a command to the secondCapture.JPG

Anonymous
Not applicable
Author

Hello,

finally, I found my answer using the interval function and the minimum


= sum(aggr(Interval(  min(  [Date Commande],2)-min(   [date],1),'D'),[Customer]))/count(distinct([Customer])