Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've obfuscated the scenario but the general idea still applies, so if the schema seems retarded, it probably is in this example...

Let's say I have a Student dimension, and in it are two attributes - Major and Minor (subjects).

I want to be able to create a Named Set in SSAS that gives me Students who have somehow been recorded as having the same subject for Major and Minor...

Dimension looks a little like this:

  - Major
  - Minor

The underlying table looks something like this:

StudentID  |  MajorKey  | MinorKey
1             50          51
2             45          101
3             58          56
4             45          45

So, in effect, I want an MDX expression like this:

  [Student].[Major] = [Student].[Minor]

... but I can't quite figure out the syntax. Any ideas?


If I use this syntax...

  [Student].[Major].Properties("Key") = [Student].[Minor].Properties("Key")

Then it slows down the ENTIRE cube for some reason. Every Measure (natural or calculated) takes several minutes as opposed to 1-2 seconds pre-cache.

share|improve this question
up vote 4 down vote accepted

I got it!

Basically the filter expression was correct, but I needed to Crossjoin the set what I wanted to filter against...

  CROSSJOIN([Student].[Major].[Major], [Student].[Minor].[Minor]),
  [Student].[Major].Properties("Key") = [Student].[Minor].Properties("Key")

I know I answered this quick but I've spent the best part of 10 hours on this today :P

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.