0

I want to return Total Sales for 2019 for County = X OR City = Y. How can I do that?

This returns error:

SELECT
{[Measures].[Total Sales]} ON 0,
{[Date].[Date].[Year].&[2019]} ON 1
FROM [Cube]
WHERE 
{([County].[County].[X]),([City].[City].[Y])}

Two sets specified in the function have different dimensionality.

Eric Klaus
  • 923
  • 1
  • 9
  • 24

1 Answers1

2

You need to address the hierarchility and dimensionality of the sets. Use the sample below.

SELECT
{[Measures].[Total Sales]} ON 0,
{[Date].[Date].[Year].&[2019]} ON 1
FROM [Cube]
WHERE 
{
([County].[County].[X],[City].[City].defaultmember),
([County].[County].defaultmember,[City].[City].[Y])
}
MoazRub
  • 2,881
  • 2
  • 10
  • 20