Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have the following table:
STORE_ID | NAME | DATE_UP |
1 | Store 1 | 14/04/2015 |
2 | Store 2 | 12/05/2015 |
3 | Store 3 | 03/03/2015 |
4 | Store 4 | 01/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
You Can use something like this
SUM(Ceil(Interval(Date#(today(), 'M/DD/YYYY') - Date#(DATE_UP, 'DD/MM/YYYY'), 'DD' )))
Try sum(rangesum(today(), -DATE_UP))
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)
You Can use something like this
SUM(Ceil(Interval(Date#(today(), 'M/DD/YYYY') - Date#(DATE_UP, 'DD/MM/YYYY'), 'DD' )))