Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
Below is the scenario
There is a date field D1. Each record is to be subtracted from today() and the difference is to be summed up.
The sum is to be shown in a text object.
Please help with the possible solution
Regards,
Priya
hi
in text object add like this
=sum(filed)
Hi Arul
Value in need is the sum of all the differences for each date value.
To be more clear,
D1
5th Jan
6th Jan
today() - 20th Jan
difference
15
14
sum of difference is 29
if we use only sum(difference) we dont get a value.
Thanks.
can you sample source like excel
i am getting 29 see this
Hi,
There is just one column as a source
it is a date value
Load * inline
[
D1
5/1/2015
6/1/2015
];
today() is a function in qlikview which results today's date.
D1-today() is to be calculated and the sum of the difference is to be shown in a text object.
Hi
Please note that, today() is not to be used inside script, since we wont get the real time value unless it is reloaded.
we want to write the expression in UI.
Hi,
Then in any text box write
=Sum( Interval(Today() - D1,'D') )
Also you can create the field in the load script
Ex:-
LOAD Interval(Today() - D1,'D') as Diff,*;
LOAD Date(Date#(D1,'DD/MM/YYYY'),'DD/MM/YYYY') AS D1;
Load * inline
[
D1
5/1/2015
6/1/2015
];
And then use
Sum(Diff)
Regards
Anand
hi try like this
sum(day(Date(filed)))
Hi,
Then you have to use only this expression
=Sum( Interval(Today() - D1,'D') )
This gives 29 if you have two dates only
Regards
Anand