0
嗨
我不是MDX專家,所以我需要幫助,說我有以下數據立方體(簡體)
月EE CoCode價值MDX查詢使用最新的價值
jan A 1 100
feb A 1 200
Mar A 2 400
Jan B 1 150
Feb B 1 100
Jan C 2 100
Mar C 2 650
月, EE和CoCode都是獨立的維度
EE一個三月變化cocode,所以我想在報告中,我想他的總戰績報告
結果是
EE CoCode Total
C 2 750
A 2 700
B 1 250
不知道的解決辦法是在
的MDX(使用currentmember或東西企業編碼),
立方體(創建currentCoCode在企業編碼Dimennsion新屬性)
或在報告分組。
感謝保羅
我使用用途的參數,是一個比較複雜一點如下
="SELECT NON EMPTY { [Measures].[ValueCode] } ON COLUMNS,
topcount(NONEMPTY ([Dim E Eno].[EE No].[EE No].ALLMEMBERS * [Dim E Eno].[Sur Name].[Sur Name].ALLMEMBERS * [Dim E Eno].[First Name].[First Name].ALLMEMBERS * [DIM Cost Centres].[Cost Centre].[Cost Centre].ALLMEMBERS * [DIM Location Codes].[Location Code].[Location Code].ALLMEMBERS * [DIM Grades].[Grade Code].[Grade Code].ALLMEMBERS * [DIM Company Codes].[Company Code].[Company Code].ALLMEMBERS * [Dim Codes].[Description].[Description].ALLMEMBERS * [Dim Codes].[Code].[Code].ALLMEMBERS * [Dim Codes].[Long Description].[Long Description].ALLMEMBERS),"+Parameters!P_TopN.Value+",[Measures].[ValueCode]) ON ROWS
FROM (SELECT (-{ [DIM Cost Centres].[Cost Centre].&[9006890557], [DIM Cost Centres].[Cost Centre].&[NA18350157], [DIM Cost Centres].[Cost Centre].&[NA18312257], [DIM Cost Centres].[Cost Centre].&[WB18350357], [DIM Cost Centres].[Cost Centre].&[EC18350157], [DIM Cost Centres].[Cost Centre].&[HSS8800257] }) ON COLUMNS
FROM (SELECT (STRTOSET(@DIMCompanyCodesCompanyCode, CONSTRAINED)) ON COLUMNS
FROM (SELECT (STRTOSET(@DimDatesYear, CONSTRAINED)) ON COLUMNS
FROM (SELECT ({ [Dim Codes].[Code].&["+Parameters!P_Reports.Value+"] }) ON COLUMNS
FROM [DW Datatrieve]))))
WHERE (IIF(STRTOSET(@DimDatesYear, CONSTRAINED).Count = 1, STRTOSET(@DimDatesYear, CONSTRAINED), [Dim Dates].[Year].currentmember)) "
什麼一塌糊塗,儘量使這個可讀格式 – Jamiec 2011-02-23 12:28:38