Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to calculate the avarage of days based on a fix startdate and multiple enddates.
E.G.
Start Date = 03/23/2009
EndDate 1 = 04/02/2009 days1 = StartDate-EndDate1
EndDate 2 = 05/07/2009 days2 = StartDate-EndDate2
EndDate3 = 06/14/2009 days3 = StartDate-EndDate3
So, the avarage is days1+days2+days3/3
I'm looking for a way to do this calculation in one formular if possible. Something like avg(EndDate-StartDate) ...
Thanks for any hint or solution
Thomas
i am not sure,
is it something like this
in your load script you can give some thing like below
makedate(2009, 03, 23) as StartDate,
EndDate,
-(makedate(2009, 03, 23) - EndDate) as Days
Then you can try
=Avg(Days) gives average of days.
Thanks
that will work for sure ... any clue doing this without pre-calculate days in the script ?
Try using rangeavg funcition. You can find more at page 378 (1265) of QlikView Reference Manual.