Problem with MDX Filter

I'm new to all of MDX's work, but the following just turns me on for the bucks. The operator FILTERI use is acting ... weird. Sample code and then description:

SELECT
    {
        FILTER(
            MEMBERS([Time].[5-4-4 Week Year]),
            [Measures].[Ship Gross Units] > 0
        )
    }
    ON COLUMNS,
    {
        FILTER(
            MEMBERS([Group].[Alternate Hierarchies]),
            [Measures].[Ship Gross Units] > 0
        )
    }
    ON ROWS
FROM SBD.SBD
WHERE
    (
        [FiscalYear].[FY09],
        [Scenario].[Actuals Total],
        [Measures].[Ship Gross Units],
        [Channel].[FOS]
    )

I am trying to pull out gross units for a specific sales channel, by the weeks of the fiscal year (some columns are slightly confused). All these filters are in place due to the fact that I often need these broken ones at the SKU level, and it is easier to use a truncated data set on my machine (let the database do the work, I say!).

Problem , this query returns 0 sales in the FOS channel. This seemed strange, so I removed the line filter:

SELECT
    {
        FILTER(
            MEMBERS([Time].[5-4-4 Week Year]),
            [Measures].[Ship Gross Units] > 0
        )
    }
    ON COLUMNS,
    MEMBERS([Group].[Alternate Hierarchies])
    ON ROWS
FROM SBD.SBD
WHERE
    (
        [FiscalYear].[FY09],
        [Scenario].[Actuals Total],
        [Measures].[Ship Gross Units],
        [Channel].[FOS]
    )

FOS. ; , , , , , . , . Perl - , "".

, - , .

!

+3
1

Microsoft Analysis Services, MDX, , Essbase.

, where. , - 0 FY09? , ?

, , NON EMPTY . .

SELECT    
   NON EMPTY MEMBERS([Time].[5-4-4 Week Year]),
     ON COLUMNS,
   NON EMPTY  MEMBERS([Group].[Alternate Hierarchies])
     ON ROWS
FROM SBD.SBD
WHERE
    (
        [FiscalYear].[FY09],
        [Scenario].[Actuals Total],
        [Measures].[Ship Gross Units],
        [Channel].[FOS]
    )
+2

Source: https://habr.com/ru/post/1699173/


All Articles