Hi everyone. I was hoping someone might have some insight into a particular query Im trying to generate.
Essentially I have a table that looks like the following:
clientID startDate endDate
1 12/1/2001 12/2/2003
2 16/2/2002 23/3/2002
3 2/3/2001 23/8/2005
.....
I have a date dimension table filled with values ranging from 1/1/2000 to 31/12/2008 incremented by 1 day
I need to create a measure (call it CountofThoseInContract) which is a basic count of those members in contract on a specified date. For example, if i specify the date:
date = 10/2/2001
CountofThoseInContract = 1
date = 20/5/2002
CountofThoseInContract = 3
... based on the above date.
The SQL query for this will be:
select count(*) from contractTable c
where date between c.startDate and c.endDate
I just cant seem to find how I can generate the same measure within olap.
Any help really appreciated!
Cheers,
Cathy
Essentially I have a table that looks like the following:
clientID startDate endDate
1 12/1/2001 12/2/2003
2 16/2/2002 23/3/2002
3 2/3/2001 23/8/2005
.....
I have a date dimension table filled with values ranging from 1/1/2000 to 31/12/2008 incremented by 1 day
I need to create a measure (call it CountofThoseInContract) which is a basic count of those members in contract on a specified date. For example, if i specify the date:
date = 10/2/2001
CountofThoseInContract = 1
date = 20/5/2002
CountofThoseInContract = 3
... based on the above date.
The SQL query for this will be:
select count(*) from contractTable c
where date between c.startDate and c.endDate
I just cant seem to find how I can generate the same measure within olap.
Any help really appreciated!
Cheers,
Cathy