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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources 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
Specialist
Specialist

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;