自 2021 年 1 月起,经典文件类型不再可用。您可以转换经典文件或下载 PDF 文件。了解更多

SAP BW MDX Query

已回答
0

评论

1 条评论

  • 正式评论
    Brett Harper

    I'm not sure exactly what is wrong from what you show, but some general information that might help:

    Given a standard MDX query defining your axes (rows, columns) and measures (used to compute value of the cell at the intersection of the coordinates of these dimension members.

    In a Flattened output each row is a unique permutation of the dimensions specified for the columns, so it is expected that repeated values might come out if those values don't depend on the member values.  For example, AC_CATEG=ACTUAL, CONSUNIT=1000 calculates the same as AC_CATEG=ACTUAL, CONSUNIT=""

    Key vs. Text: By default, most MDX implementations return the key of a dimension member. To get the descriptive text, you'll usually need to explicitly request it. This often involves functions like MEMBER_CAPTION, MEMBER_NAME, or properties like [Dimension].[Hierarchy].[Member].Properties("Caption"). The exact syntax depends on your BW version and the specific dimension.

    SELECT 
        {[Measures].[Sales Amount]} ON COLUMNS,
        {
            MEMBER_CAPTION([Customers].[Customer].[Customer1]), // Get text for Customer1
            [Customers].[Customer].[Customer2].Properties("Caption") // Another way to get text
        } ON ROWS
    FROM [Your Cube]

    Mapping: When the processing of the output of RSR_MDX_GET_FLAT_DATA happens, it should use the information from RSR_MDX_GET_AXIS_INFO to correctly interpret the data. If an axis element was defined in your MDX to return text (using MEMBER_CAPTION or similar), the corresponding data in RSR_MDX_GET_FLAT_DATA will contain that text. Otherwise, it will be the key.

请先登录再写评论。