添加新列时出错

时间:2013-05-20 19:52:42

标签: reporting-services mdx

我正在尝试使用查询构建器将“帐户子类别”列添加到我的报告中。

我添加了该列并收到了错误消息:

  

“预计会出现MDX表达式。指定了空表达式。”

如何格式化MDX以获得我想要的结果?

我发布了以下代码。希望这会有所帮助。

SELECT NON EMPTY { [Measures].[Order Partic Adj], [Measures].[PY Net Cash], [Measures].[Order Merch Adj], [Measures].[OCCURS - APY BOOKING FACT], [Measures].[PY Orders], [Measures].[Net Cash Merch Adj], [Measures].[Net Cash Acq Adj], [Measures].[Total Proj Orders], [Measures].[Order Acq Adj], [Measures].[Net Cash Partic Adj], [Measures].[Total Proj Net Cash] } ON COLUMNS, NON EMPTY { ([Current Assignment].[Territory Code].[Territory Code].
ALLMEMBERS * [Current Assignment].[Sales Rep Name Caps].[Sales Rep Name Caps].

ALLMEMBERS * [Current Assignment].[Sales Rep Employee Code].[Sales Rep Employee Code].
ALLMEMBERS * [Account].[Account Subcategory Name].[Account Subcategory Name].
ALLMEMBERS * [Account].[ACCOUNT NAME].[ACCOUNT NAME].
ALLMEMBERS * [Account].[LIFETOUCH ID].[LIFETOUCH ID].
ALLMEMBERS * [Account].[NACAM Ordered].[NACAM Ordered].
ALLMEMBERS * [Account].[ENROLLMENT COUNT].[ENROLLMENT COUNT].
ALLMEMBERS * [Account].[STATE].[STATE].
ALLMEMBERS * [Account].[District Name].[District Name].
ALLMEMBERS * [Account].[City].[City].
ALLMEMBERS * [Account].[COUNTY].[COUNTY].
ALLMEMBERS * [APY].[BOOKING STATUS].[BOOKING STATUS].
ALLMEMBERS * [APY].[X BOOKING STATUS ID].[X BOOKING STATUS ID].
ALLMEMBERS * [APY].[AT RISK IND].[AT RISK IND].
ALLMEMBERS * [APY].[INCENTIVE ACQUISITION IND].[INCENTIVE ACQUISITION IND].
ALLMEMBERS * [APY].[CY BOOKING CAMERA TYPE NAME].[CY BOOKING CAMERA TYPE NAME].
ALLMEMBERS * [APY].[CURRENT YEAR SELLING METHODS].[CURRENT YEAR SELLING METHODS].
ALLMEMBERS * [APY].[PY ACTUAL CAMERA TYPE NAME].[PY ACTUAL CAMERA TYPE NAME].
ALLMEMBERS * [APY].[ACQUIRED BUSINESS NAME].[ACQUIRED BUSINESS NAME].
ALLMEMBERS * [APY].[PRIOR YEAR SELLING METHODS].[PRIOR YEAR SELLING METHODS].
ALLMEMBERS * [Marketing].[SUB PROGRAM NAME].[SUB PROGRAM NAME].
ALLMEMBERS * [Current Assignment].[AMS Business Unit Name].[AMS Business Unit Name].

ALLMEMBERS * [Account].[POSTAL CODE].[POSTAL CODE].
ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT ( STRTOSET(@APYBOOKINGSTATUS, CONSTRAINED) ) ON COLUMNS FROM ( SELECT ( STRTOSET(@CurrentAssignmentSalesRepNameCaps, CONSTRAINED) ) ON COLUMNS FROM ( SELECT ( STRTOSET(@CurrentAssignmentTerritoryCode, CONSTRAINED) ) ON COLUMNS FROM ( SELECT ( STRTOSET(@CurrentAssignmentRegionName, CONSTRAINED) ) ON COLUMNS FROM ( SELECT ( STRTOSET(@CurrentAssignmentAreaName, CONSTRAINED) ) ON COLUMNS FROM ( SELECT ( STRTOSET(@CurrentAssignmentAMSBusinessUnitName, CONSTRAINED) ) ON COLUMNS FROM ( SELECT ( STRTOSET(@CurrentAssignmentCountryName, CONSTRAINED) ) ON COLUMNS FROM ( SELECT ( STRTOSET(@SchoolYearSCHOOLYEAR, CONSTRAINED) ) ON COLUMNS FROM ( SELECT ( STRTOSET(@MarketingSUBPROGRAMNAME, CONSTRAINED) ) ON COLUMNS FROM [BO_APY_Booking_Fact_Full]))))))))) WHERE ( IIF( STRTOSET(@SchoolYearSCHOOLYEAR, CONSTRAINED).Count = 1, STRTOSET(@SchoolYearSCHOOLYEAR, CONSTRAINED), [School Year].[SCHOOL YEAR].currentmember ), IIF( STRTOSET(@CurrentAssignmentCountryName, CONSTRAINED).Count = 1, STRTOSET(@CurrentAssignmentCountryName, CONSTRAINED), [Current Assignment].[Country Name].currentmember ), IIF( STRTOSET(@CurrentAssignmentAreaName, CONSTRAINED).Count = 1, STRTOSET(@CurrentAssignmentAreaName, CONSTRAINED), [Current Assignment].[Area Name].currentmember ), IIF( STRTOSET(@CurrentAssignmentRegionName, CONSTRAINED).Count = 1, STRTOSET(@CurrentAssignmentRegionName, CONSTRAINED), [Current Assignment].[Region Name].currentmember ) ) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS

0 个答案:

没有答案