MDX Parameters with SSRS

  • Here is what I have:

    This one works:

    With

    SELECT

    {

    [Measures].[NetSales],

    [Measures].[NetSales Regular],

    [Measures].[NetSales Corporate Promo],

    [Measures].[Sales Plan],

    [Measures].[NetSales Var $],

    [Measures].[NetSales Var Percent],

    [Measures].[Gross Margin $],

    [Measures].[Gross Margin Total %],

    [Measures].[Gross Margin $ Regular],

    [Measures].[Gross Margin Regular %],

    [Measures].[Gross Margin $ Corporate Promo],

    [Measures].[Gross Margin Corporate Promo %],

    [Measures].[Margin Plan],

    [Measures].[Margin Var $],

    [Measures].[Margin Var Percent],

    [Measures].[Inventory $ EOW],

    [Measures].[Inventory Plan],

    [Measures].[Inventory Var $],

    [Measures].[Inventory Var Percent],

    [Measures].[COGS/Inv Ratio Last Month],

    [Measures].[COGS/Inv Ratio Var],

    [Measures].[COGS/Inv Ratio Plan],

    [Measures].[Margin/Inv Ratio Last Month],

    [Measures].[Margin/Inv Ratio Plan],

    [Measures].[Margin/Inv Ratio Var]

    }

    ON COLUMNS,

    {

    ([Product].[Super Department].[Super Department],

    [Product].[Department].[Department]

    - [Product].[Department].[NonMerchandise]

    - [Product].[Department].[Unassigned - Department (INACTIVE)],

    [Product].[Dept Buyer].[Dept Buyer])

    }

    ON ROWS

    FROM

    [Sales]

    WHERE

    ([Calendar].[Fiscal Year Name].[FY 2010])

    But this query does not:

    ="With

    SELECT

    {

    [Measures].[NetSales],

    [Measures].[NetSales Regular],

    [Measures].[NetSales Corporate Promo],

    [Measures].[Sales Plan],

    [Measures].[NetSales Var $],

    [Measures].[NetSales Var Percent],

    [Measures].[Gross Margin $],

    [Measures].[Gross Margin Total %],

    [Measures].[Gross Margin $ Regular],

    [Measures].[Gross Margin Regular %],

    [Measures].[Gross Margin $ Corporate Promo],

    [Measures].[Gross Margin Corporate Promo %],

    [Measures].[Margin Plan],

    [Measures].[Margin Var $],

    [Measures].[Margin Var Percent],

    [Measures].[Inventory $ EOW],

    [Measures].[Inventory Plan],

    [Measures].[Inventory Var $],

    [Measures].[Inventory Var Percent],

    [Measures].[COGS/Inv Ratio Last Month],

    [Measures].[COGS/Inv Ratio Var],

    [Measures].[COGS/Inv Ratio Plan],

    [Measures].[Margin/Inv Ratio Last Month],

    [Measures].[Margin/Inv Ratio Plan],

    [Measures].[Margin/Inv Ratio Var]

    }

    ON COLUMNS,

    {

    ([Product].[Super Department].[Super Department],

    [Product].[Department].[Department]

    - [Product].[Department].[NonMerchandise]

    - [Product].[Department].[Unassigned - Department (INACTIVE)],

    [Product].[Dept Buyer].[Dept Buyer])

    }

    ON ROWS

    FROM

    [Sales]

    WHERE

    (" & Parameters!FYYear.Value & ")"

    The FYYear parameter has the value of [Calendar].[Fiscal Year Name].[FY 2010].

    What am i doing wrong? I am using OLE DB for my connections and all that good stuff.

  • nevermind, i loaded up profiler and found out that there was spaces missing after the WITH statement, i guess an enter isnt sufficient. go figure.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply