Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a table kind of this
EmployeeID TerritoryID StartDate EndDate
275 2 7/1/2006 12/31/2007
275 3 1/1/2008
Here in second row you can see Endate is blank
Other table i have is Order table having OrderDate, its sales etc.
I am applying statement
IntervalMatch(OrderDate) LOAD StartDate as StartDate, EndDate from table
But, when i am caluclating sum or count of employee. It is calculating only for the interval where Enddate is given. But wat about where Enddate is not given?
Regards
Lavi
Well you could check if EndDate is not given on load and set an EndDate far in the future, like
= if(isNull(EndDate)=-1,MakeDate(2199,12,31),EndDate) as EndDate
Regards,
Stefan
P.S: instead of the MakeDate, I think today() or yearend(today()) might also be sensibel and more flexibel.
Well you could check if EndDate is not given on load and set an EndDate far in the future, like
= if(isNull(EndDate)=-1,MakeDate(2199,12,31),EndDate) as EndDate
Regards,
Stefan
P.S: instead of the MakeDate, I think today() or yearend(today()) might also be sensibel and more flexibel.