I believe this bug is related to a many-to-many relationship and to an agg I designed to optimize that. I was unable to reproduce this against Adventure Works, but I think it is very closely related to another bug I reported:
It's basically the same situation I describe in there, except this is not on Adventure Works. Some queries produce nulls. Some queries return the right numbers. Some queries produce the following error:
Internal error: An unexpected error occurred (file 'mdsubcube.cpp', line 5257, function 'MDSubcube::IsPartiallyCoveringCell').
The query that produces that error looks like:
select [Measures].[My Measures] on 0,
NON EMPTY [ManyToMany Dim].[Attrib].[Attrib].Members
I know that's not much help for you to reproduce, but I hope it gives you some clues to research.
I think this error may be the same as: