2 hierarchical dimensions (for location and time) are defined on a cube. My question is about possibility of writing a single MDX query for retrieving following structure. I mean writing a single query for obtaining values V1, V2, V3 and V4:
The obvious way is to use multiple MDX queries. Just wondering if there is some magic syntax in MDX.
Try:
SELECT
{
[Measures].[Some Measure]
} ON 0,
{
[Location].[Level 1].[Level 1].Members*
[Date].[Year].[Year].Members*
[Location].[Level 2].[Level 2].Members
} ON 1
FROM [Your Cube]
You can also get the totals with:
SELECT
{
[Measures].[Some Measure]
} ON 0,
{
[Location].[Level 1].Members*
[Date].[Year].Members*
[Location].[Level 2].[Level 2].Members
} ON 1
FROM [Your Cube]
No magic here - just crossjoining the attribute hierarchies as needed. Please note that if you place the two Location hierarchies next to each other the excution will be faster.
No idea if this completely answers your question but at least may help a bit...