我試圖建立一個查詢將從一個多維數據集中檢索值,並在一個月建造日期和一年的基礎上,當前日期日期SSRS報告。基本上,我試圖建立一個報告,應該是這個樣子......MDX月初至今年初至今查詢
Type Customer Product Group Quantity Shipped MTD Quantity Shipped YTD
=====================================================================
OE CompanyX Bikes 5 396
Helmets 10 254
CompanyY Repair Kits 93 653
T-shirts 38 564
Shoes 10 120
我真的爲此而努力,到目前爲止,這是我想出...
WITH
MEMBER [Measures].[Quantity Shipped YTD] As Sum(YTD([Date].[Dates].CurrentMember),[Measures].[Quantity Shipped])
Member [Measures].[Quantity Shipped MTD] As Sum(MTD([Date].[Dates].CurrentMember),[Measures].[Quantity Shipped])
SELECT NON EMPTY { [Measures].[Quantity Shipped MTD], [Measures].[Quantity Shipped YTD] } ON COLUMNS,
NON EMPTY { ([Customer].[Business Type].[Business Type].ALLMEMBERS * [Customer].[Customer].[Customer].ALLMEMBERS * [Customer Sales].[Summary Prod Group 1].[Summary Prod Group 1].ALLMEMBERS) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
FROM (SELECT (-{ [Customer Sales].[Summary Prod Group 1].&[Missing Product Group] }) ON COLUMNS
FROM (SELECT ({ [Customer].[Customer Code].&[2.254E3], [Customer].[Customer Code].&[2.063E3], [Customer].[Customer Code].&[2.183E3], [Customer].[Customer Code].&[2.261E3], [Customer].[Customer Code].&[5.3753E4], [Customer].[Customer Code].&[1.3084E5], [Customer].[Customer Code].&[1.37058E5] }) ON COLUMNS
FROM (SELECT ({ [Customer].[Business Type].&[OE] }) ON COLUMNS
FROM (SELECT ([Date].[Day].&[Now()]) ON COLUMNS
FROM [Sales])))) WHERE ([Customer].[Customer Code].CurrentMember)
CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS
上面的查詢不檢索雖然什麼。我得到的只是一個空白的結果集。還有很多更多的領域,我需要渡過難關,但我猜想,如果我能得到運工作的數量,我可以得到一切。請幫忙。 TX
你有一個成員叫這個 ?! '[日期],[日]&[NOW()]' – whytheq