dbTalk Databases Forums  

looking for "between StartDate and EndDate" equivalent in MDX...

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss looking for "between StartDate and EndDate" equivalent in MDX... in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jéjé
 
Posts: n/a

Default looking for "between StartDate and EndDate" equivalent in MDX... - 11-01-2004 , 08:50 PM






Hi,

I've a lot of cubes which contain activities and contracts information.
each row in my datawarehouse has a start date and a end date

EmploeeID;Start Date;End Date;JobID;Salary...

My users want to select any day in a year and display the number of "active
employees" and the total salary of all the contracts at the date.
So, in SQL, I'm using a between statement.
select * from contracts where UserDate between StartDate and EndDate

but how to do the same job in a cube?
the employee's job can change at any time.

I'll have 2 measures: 1 distinct count on the employeeid and a sum of
salaries.

what is the easy way?

Thanks
Jerome



Reply With Quote
  #2  
Old   
Jéjé
 
Posts: n/a

Default Re: looking for "between StartDate and EndDate" equivalent in MDX... - 11-01-2004 , 09:17 PM






I've ommit this:
my users used excel and the OWC by default to access my cubes.
and when a user select a month, then the reference date is the last day of
the month.


"Jéjé" <willgart (AT) BBBhotmailAAA (DOT) com> a écrit dans le message de news:
uWzZ1aIwEHA.1988 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Quote:
Hi,

I've a lot of cubes which contain activities and contracts information.
each row in my datawarehouse has a start date and a end date

EmploeeID;Start Date;End Date;JobID;Salary...

My users want to select any day in a year and display the number of
"active employees" and the total salary of all the contracts at the date.
So, in SQL, I'm using a between statement.
select * from contracts where UserDate between StartDate and EndDate

but how to do the same job in a cube?
the employee's job can change at any time.

I'll have 2 measures: 1 distinct count on the employeeid and a sum of
salaries.

what is the easy way?

Thanks
Jerome





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.