Query #1 is correctly calculating the median per attribute member of a datetime dimension
Query #2 is calculating the median for the entire set instead of per attribute member of a degenerate dimension
Besides the type of dimensions, the only other difference that I can think of between the queries is that the attribute of the degenerate dimension is discretized. I would greatly appreciate it if somebody could explain to me why I am not able to get query #2 to work properly.
Also, I should mention that [c ID] is the primary key of the fact table. That is the only way I was able to get query #1 to work also. I might not have designed the original query in the most effective way to begin with.
#1
WITH MEMBER [Measures].[High Low Diff Median] AS Median ([Gbp Usd Gaps H1].[c ID].Children,[Measures].[High Low Diff Sum]) SELECT { [Measures].[High Low Diff Median] } ON 0, { ([Dim Date Time].[Hour Num].Children) } ON 1 FROM h1
#2
WITH MEMBER [Measures].[High Low Diff Median] AS Median ([Gbp Usd Gaps H1].[c ID].Children,[Measures].[High Low Diff Sum]) SELECT { [Measures].[High Low Diff Median] } ON 0, { ([Gbp Usd Gaps H1].[Boll Width].Children) } ON 1 FROM h1