Created
March 14, 2014 15:44
-
-
Save deinspanjer/9550327 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| uniqueMembers="true" means that there will never be another member with the same value at this level. | |
| Imagine a People dimension filled with only people from the USA. | |
| We'll have a couple of different levels, completely weird and made up. :) | |
| Country of Birth | |
| Gender | |
| Surname | |
| Given Name | |
| Social Security Number | |
| Attitude (Either Optimist or Pessimist) | |
| You would likely have a technical key as the primary key for that table. Obviously, that technical key would be unique, but that doesn't matter because typically your technical key would never be a level in your dimensional hierarchy. | |
| Out of all these levels, the only one that could possibly be marked as uniqueMembers="true" is the Social Security Number level because no two people will ever have the same one. | |
| Even though there are only two Attitude values, there will be many people with one or the other so they aren't unique within the level. | |
| In the documentation for <Level>, it mentions that the first level is always unique. Even though Many people might have the same country of birth, if you ask for the top level of the hierarchy, you wouldn't expect to see the same country repeated. There are only N members of that level where N is equal to the number of different countries of birth in your dimension. | |
| If you ask for the Gender level though, what you are actually asking for is the complete hierarchy from Country of Birth down to Gender which means you'll see many Male and Female (and possibly others depending on your definition of gender) such as USA.Male, USA.Female, Brazil.Male, Brazil.Female. | |
| SSN is a good potential example of where you would use uniqueMembers=true. Another is in a date dimension, if the lowest level is a single day, then that level would have uniqueMembers=true because while there may be many days that are the 15th day of the month, there will only ever be one 2014-03-15. | |
| If your date dimension included hours of the day though, then day would not be unique because there would be 24 instances if you ask for the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment