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…):

image

With Analysis Services 2005 SP1 (build 9.00.2047) we get the expected result:

image

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.

image

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.

UPDATE: this issue is described in KB938585 that is part of KB936305 (that refers to build 3175). Thanks to Andrea for pointing me to the existing articles.