Skip to main content
Announcements
Applications are open for the 2024 Qlik Luminary Program. Apply by December 15 here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Carlaf_93
Creator II
Creator II

calculate number of days between two or more dates

good morning,

i've got a table like this

LORI 01/01/2023 10
LORI 02/01/2023 50

 

i would like to get the number of days between the two days.

Ho can i do it?

 

thanks

C.

Labels (1)
1 Reply
Gabbar
Creator III
Creator III

Lets Name these Columns as 
Name, Date , Number respectively.

Try this:
A:
Load Name,Date,Number From source.

Noconcatenate
B:
Load *, if(Name=previous(Name),previous(Date)-Date,null()) as Number Of Days
resident A order by Name asc, Date Desc;
Drop Table A;


Regards, Akash Dhandhi.
If this resolves your Query please like and accept this as an answer.