0
"작업"큐브가 있습니다. 크기는 "시간"과 "작업 ID"이며 측정 값은 "작업 수"및 "총 시간"과 계산 된 측정 값 "평균 작업 시간"입니다. 평균 5 위 활동을 계산하려고하는데 전날의 변화를 보여 주려고합니다.MDX : 상위 5 개 작업에 대한 평균 작업 시간 및 변경 시간 계산
WITH MEMBER [Measures].[Change] AS
([Time].CurrentMember, [Measures].[Number of Actions])/(ParallelPeriod ([Day], 1, [Time].CurrentMember), [Measures].[Number of Actions]),
FORMAT_STRING = 'Percent'
SELECT [Measures].[Change] on COLUMNS,
NON EMPTY [Time].[2005].[1].children on ROWS
FROM [Actions];
을하지만 하나의 MDX 쿼리로 결합하는 방법을 알아낼 수 없습니다 :
SELECT {[Measures].[Avg Action Time]} ON COLUMNS,
NON EMPTY TopCount(except([Action ID].members, {[Action ID].[All Action IDs]}), 5, [Measures].[Avg Action Time]) ON ROWS
FROM Actions
WHERE [Time].[2005].[1];
과 : 나는 두 개의 별도의 질의에이 작업을 수행 할 수 있습니다. 내가 시도 :
WITH MEMBER [Measures].[Change] AS
([Time].CurrentMember, [Action ID].CurrentMember, [Measures].[Avg Action Time])/(ParallelPeriod ([Day], 1, [Time].CurrentMember), [Action ID].CurrentMember, [Measures].[Avg Action Time]),
FORMAT_STRING = 'Percent'
SELECT {[Measures].[Avg Action Time], [Measures].[Change]} ON COLUMNS,
NON EMPTY TopCount(except([Action ID].members, {[Action ID].[All Action IDs]}), 5, [Measures].[Avg Action Time]) ON ROWS
FROM Actions
WHERE [Time].[2005].[1];
하지만 변화의 비율이 항상 무한대, 그래서 그것은 분명히 옳은 일을 계산하지 않습니다. 올바른 쿼리는 무엇입니까?