dbTalk Databases Forums  

calculated member with SQL where clause functionality ?

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


Discuss calculated member with SQL where clause functionality ? in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kary
 
Posts: n/a

Default calculated member with SQL where clause functionality ? - 04-07-2005 , 05:46 PM






Here is the layout of my Job/Employment fact:


emp_id, bgndate_id, enddate_id, dept_id,status_id,year_val(not an ID)

Each of the ID columns above is a reference to a dimension(employee,
begin date, end date, department, status).

What I want to be able to do is:

count(distinct emp_id)
where bgndate <= 1/1/year_val<= enddate
and emp_status in ('VAL1','VAL2')

i.e count only people who have a record with begin and end dates
spanning the begining of any year.

The bgdate, enddate I mention above in my pseudo-query would have to be
obtained from the respective date dimensions.

The begin and end dates function as dates which determine duration for
which any record is valid.


How would I go about buidling a measure/calculated measure using MDX to
accomplish the above ?


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.