Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何根据mdx维度进行筛选_Mdx - Fatal编程技术网

如何根据mdx维度进行筛选

如何根据mdx维度进行筛选,mdx,Mdx,我有一个查询,我想在其中一个维度字段的最大值上对其进行过滤,如下所示: SELECT { [Measures].[F Sra Quantity], [Measures].[F Sra Gross], [Measures].[F Sra Disc TOTAL] } DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME ON COLUMNS, NON EMPTY CrossJoi

我有一个查询,我想在其中一个维度字段的最大值上对其进行过滤,如下所示:

SELECT
    {
    [Measures].[F Sra Quantity],
    [Measures].[F Sra Gross],
    [Measures].[F Sra Disc TOTAL]
    } 

DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME 
ON COLUMNS, 

NON EMPTY

CrossJoin( 
        {[Branch Dim].[b Name].Children},
        {[Date Dim].[d Year Month].Children},
        {[Date Dim].[Full Date].Children},
        {[Customer Dim].[c Name].Children},
        {[Customer Dim].[c Path].Children},
        {[Order Specification Dim].[Os Type No].Children},
        {[Sales Team Dim].[Id].Children},
        {[Sales Team Dim].[St Visitor].Children}
        )

ON ROWS 

FROM [D Sys Warehouse]

我想根据[Os Type No]的最大值对其进行过滤,其成员总是在更改。您能帮助我吗?

未测试,因为我不在
SSAS
AdvWrks
多维数据集附近,但假设我正确解释了您的请求,以下内容可能会起作用:

WITH MEMBER [Measures].[MAX_No] AS
  MAX(
    [Order Specification Dim].[Os Type No].MEMBERS,
    [Order Specification Dim].[Os Type No].CURRENTMEMBER.MEMBER_VALUE
  )
SELECT
    {
    [Measures].[F Sra Quantity],
    [Measures].[F Sra Gross],
    [Measures].[F Sra Disc TOTAL]
    } 

DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME 
ON COLUMNS, 

NON EMPTY

CrossJoin( 
        {[Branch Dim].[b Name].Children},
        {[Date Dim].[d Year Month].Children},
        {[Date Dim].[Full Date].Children},
        {[Customer Dim].[c Name].Children},
        {[Customer Dim].[c Path].Children},
        {[Order Specification Dim].[Os Type No].Children},
        {[Sales Team Dim].[Id].Children},
        {[Sales Team Dim].[St Visitor].Children}
        )
HAVING 
  [Order Specification Dim].[Os Type No].CURRENTMEMBER.MEMBER_VALUE = [Measures].[MAX_No]
ON ROWS 

FROM [D Sys Warehouse]

您的意思是您只希望在输出中具有最大值
[Os Type No]
?是的,当然[Os Type No]具有所有三个度量值的非空值。