1

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

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

“需要一个 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
4

0 回答 0