Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum of total dates between dates (overlap dimension)

Hello

I have the following table:

   

STORE_IDNAMEDATE_UP
1Store 114/04/2015
2Store 212/05/2015
3Store 303/03/2015
4Store 401/06/2015

I want to put on the text box the total days between the DATE_UP and today.

In this example the result must be equal to 250

Resulting of the sum: 71 (14/04/2015 to Today) + 43 (12/05/2015 to Today) + 113 (03/03/2015 to Today) + 23 (01/06/2015 to Today)

Thanks in advance for your help

1 Solution

Accepted Solutions
Not applicable
Author

You Can use something like this

SUM(Ceil(Interval(Date#(today(), 'M/DD/YYYY') - Date#(DATE_UP, 'DD/MM/YYYY'), 'DD' )))

View solution in original post

3 Replies
Gysbert_Wassenaar

Try sum(rangesum(today(), -DATE_UP))


talk is cheap, supply exceeds demand
swuehl
MVP
MVP

I do get a slightly different sum (maybe you are ahead of time?),but I think you should get what you want by using

=sum(aggr(today()-DATE_UP, STORE_ID))

edit:

Gysbert is right, you don't need advanced aggregation here:

=sum( today() - DATE_UP)

Not applicable
Author

You Can use something like this

SUM(Ceil(Interval(Date#(today(), 'M/DD/YYYY') - Date#(DATE_UP, 'DD/MM/YYYY'), 'DD' )))