Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to derive no. of days from date field.

Hi folks,

Situation is I want to calculate the no. of days a person been actively using a service. Based on a customers earliest period (date) of using the service till the current date of their usage, I would like to compute the no. of days.

Any idea on how to do so? Sample script?

Please advise. Thank you.

Best Regards,

R

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Take a straight table; Customer as dimension; expression, something like: Max(Date)-Min(Date)

It all depends on your data, how your records are being stored.

View solution in original post

5 Replies
alexandros17
Partner - Champion III
Partner - Champion III

If you have 2 dates and you need to compute N° of days between them, simply

Num(Date2) - Num(Date1) gives you the number of days

Not applicable
Author

Like this

 

=Date(Today())-Date(today()-100)

Note: Change according to your usage.

tresesco
MVP
MVP

Take a straight table; Customer as dimension; expression, something like: Max(Date)-Min(Date)

It all depends on your data, how your records are being stored.

Not applicable
Author

That just doesn't make any sense to me.

Not applicable
Author

Thanks once again tres! Your a legend.