SELECT
{ [Measures].[Net] } ON COLUMNS
, NON EMPTY
{ ([Bill To].[Customer Name].[Customer Name].ALLMEMBERS
* [Bill To].[Account Type].[Account Type].ALLMEMBERS
* [Reporting Date].[Fiscal Period].[Fiscal Period].ALLMEMBERS ) }
DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME
ON ROWS
FROM ( SELECT ( STRTOSET(@EmployeeDimEmployeeManagerCode ) ) ON COLUMNS
FROM ( SELECT ( STRTOSET(@BillToDimCustAccountType ) ) ON COLUMNS
FROM ( SELECT ( STRTOSET(@GeneralLedgerDimGLBusinessUnit ) ) ON COLUMNS
FROM ( SELECT ( STRTOSET(@CompanyDimCompanyName ) ) ON COLUMNS
FROM ( SELECT ( STRTOMEMBER(@FromCalendarDateDimMonth ) : STRTOMEMBER(@FromCalendarDateDimMonth ).LAG(11) ) ON COLUMNS
FROM [Revenue]))))) WHERE ( IIF( STRTOSET(@CompanyDimCompanyName, CONSTRAINED).Count = 1
, STRTOSET(@CompanyDimCompanyName, CONSTRAINED)
, [Company].[Company].currentmember )
, IIF( STRTOSET(@GeneralLedgerDimGLBusinessUnit, CONSTRAINED).Count = 1
, STRTOSET(@GeneralLedgerDimGLBusinessUnit, CONSTRAINED)
, [Product].[GL Business Unit].currentmember )
, IIF( STRTOSET(@EmployeeDimEmployeeManagerCode, CONSTRAINED).Count = 1
, STRTOSET(@EmployeeDimEmployeeManagerCode, CONSTRAINED)
, [Order Primary Sales Assignment].[Order Primary Sales Assignment Manager Name].currentmember ) )
CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE
, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS
我只是一名新手MDX开发者。在上面的查询中(由其他人撰写)我不理解'from'部分。为什么我们将strtoset参数放在列中以及我们从Revenue cube ???中提取什么?
答案 0 :(得分:0)
此查询包含subselects;此功能用于过滤查询。
在执行查询之前,将替换所有变量,如@EmployeeDimEmployeeManagerCode
。 StrToSet函数用于降低注入攻击的风险。