Note that there are some explanatory texts on larger screens.

plurals
  1. POFilter by one MDX dimension but display another
    primarykey
    data
    text
    <p>I'm trying to write an MDX query that limits the results returned by one dimension of my cube but displays the aggregate from another, does anyone know if this is possible?</p> <p>What I effectively want to execute is:</p> <pre><code>SELECT NON EMPTY Filter([Index].[Index].Members, [Imnt Ctry].[ImntCtry].CurrentMember.Name&lt;&gt;"GB") ON ROWS, NON EMPTY {[Measures].[T.SUM], [Measures].[B.SUM], [Measures].[L.SUM], [Measures].[SBL.SUM], [Measures].[P.SUM], [Measures].[R.SUM], [Measures].[Coll.SUM], [Measures].[Long.SUM], [Measures].[Short.SUM], [Measures].[Firm.SUM], [Measures].[Net.SUM], [Measures].[PTH.SUM]} ON COLUMNS FROM [PositionsCube] </code></pre> <p>This executes but returns nothing, I can alternatively execute:</p> <pre><code>SELECT NON EMPTY Crossjoin([Index].[Index].Members, Filter([Imnt Ctry].[ImntCtry].Members, [Imnt Ctry].[ImntCtry].CurrentMember.Name&lt;&gt;"GB")) ON ROWS, NON EMPTY {[Measures].[T.SUM], [Measures].[B.SUM], [Measures].[L.SUM], [Measures].[SBL.SUM], [Measures].[P.SUM], [Measures].[R.SUM], [Measures].[Coll.SUM], [Measures].[Long.SUM], [Measures].[Short.SUM], [Measures].[Firm.SUM], [Measures].[Net.SUM], [Measures].[PTH.SUM]} ON COLUMNS FROM [PositionsCube] </code></pre> <p>which gives me the correct result set, but is now aggregating by Index > Imnt Ctry where I just want Index.</p> <p>Additionally I have tried declaring a set and using an Intersection, but the intersection has to declare the same dimensions as the set else doesn't parse so is no more use.</p> <p>It seems this would be a logical operation to want to perform, but I just can't get it.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload