(SSAS) 需要在其他计算中使用计算度量的总和,而不管它们是否符合条件

(SSAS) Need to use the total of a calculated measure in other calculations irrespective of - whether they qualify or not

我有一个维度将劳动力分为直接劳动力和间接劳动力 现在我有一个措施 [间接时间] 只适用于间接雇员,其他人保持空白。 另一个指标 [direct hours] 仅适用于直接员工,其他人保持空白。

我想创建一个计算量度 [间接工时]/[直接工时] 并在所有直接员工面前显示。

目前那里全是空白。 任何帮助将不胜感激

编辑:

 LaborType  |   DirectHrs   |   IndirectHrs | Calculation_Expected 
 direct         10              <Blank>         (1+2+3+4)/10=1 
 direct         20              <Blank>         (1+2+3+4)/20=0.5 
 direct         30              <Blank>         (1+2+3+4)/30=0.33 
 direct         40              <Blank>         (1+2+3+4)/40=0.25 
 Indirect       <Blank>             1           <Blank> 
 Indirect       <Blank>             2           <Blank> 
 Indirect       <Blank>             3           <Blank> 
 Indirect       <Blank>             4           <Blank>

如果我编辑并放入您的 post 中的 table 是正确的,您可以使用如下计算:

CREATE MEMBER CURRENTCUBE.[Measures].[Calculated Member]
 AS CASE WHEN IsEmpty([Measures].[DirectHrs])
THEN NULL
ELSE ([Measures].[IndirectHrs],[DimensionName].[LaborType].[Indirect])
/
[Measures].[DirectHrs]
END;