I just found that this query has different behavior (with breaking differences in result) with different builds of Analysis Services 2005.
This is the query (I used a bitmap because this query throws an error when I try to put it in text in Community Server blog – if someone want to check this other issue…):
With Analysis Services 2005 SP1 (build 9.00.2047) we get the expected result:
When we move to Analysis Services 2005 SP2 (I tested with builds 9.00.3050, 9.00.3054, 9.00.3152) you get a different number of columns: the KEY0 keyword returns one column for each field that is part of a composite key, instead of only the required part.
The good news is that the build 9.00.3175 (that you can obtain asking to PSS) returns to the right behavior of build 9.00.2047.
I looked for other information about this bug on the web but I haven’t found anything. This feedback seems very similar but it still doesn’t work with build 9.00.3175, thus it isn’t the same.