add an measure to distinct count employee_id instead of employee_k - sqlserver-datawarehouse
This is a discussion on add an measure to distinct count employee_id instead of employee_k - sqlserver-datawarehouse ; Hi, I would like to add another measure into cube which is counting distinct employee_id instead of employee_key (surrogate key) This is the relationship I have in cube Fact_employee_time: Fact_time_key, Employee_key, Date_Key, .... hours, cost,.. Fact_employee_travel: Fact_travel_key, Employee_key, Date_Key, airfare, ...
![]() |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| I would like to add another measure into cube which is counting distinct employee_id instead of employee_key (surrogate key) This is the relationship I have in cube Fact_employee_time: Fact_time_key, Employee_key, Date_Key, .... hours, cost,.. Fact_employee_travel: Fact_travel_key, Employee_key, Date_Key, airfare, ... dim_employee: Employee_key, Employee_id, ... (same employee_Id has many employee_key) Is there any MDX to pull distinct employee count (distinct employee_ID count) as a measure. FACT and DIM table only use Key to join. Couldn't get the right MDX to work to get distinct employee_id count at this moment. Thank you in advance. -- Best Regards, Lynn |
|
#2
| |||
| |||
|
Add column for Employee_Id to Fact tables and define new measure based on it with the option of Distinct Count. Ohjoo. "Lynn" news:2D661EDF-F3CA-4868-802A-C8C367F37F07@microsoft.com... > Hi, > > I would like to add another measure into cube which is counting distinct > employee_id instead of employee_key (surrogate key) > > This is the relationship I have in cube > > Fact_employee_time: Fact_time_key, Employee_key, Date_Key, .... hours, > cost,.. > Fact_employee_travel: Fact_travel_key, Employee_key, Date_Key, airfare, > ... > dim_employee: Employee_key, Employee_id, ... (same employee_Id has many > employee_key) > > Is there any MDX to pull distinct employee count (distinct employee_ID > count) as a measure. FACT and DIM table only use Key to join. Couldn't > get > the right MDX to work to get distinct employee_id count at this moment. > > Thank you in advance. > -- > Best Regards, > > Lynn |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
All times are GMT -4. The time now is 11:48 AM.




Linear Mode