hi i am new to mdx, i want to combine two select statement resultset (side by side like union) using mdx query,please any body help me to solve this query first query:
SELECT
{ [Last Year] }
ON COLUMNS,
{ {[Location].[Location].&[7], [Location].[Location].&[12], [Location].[Location].&[11],
[Location].[Location].&[19], [Location].[Location].&[17], [Location].[Location].&[16],
[Location].[Location].&[9], [Location].[Location].&[18] },{[Location].[Location].[All]}}
ON ROWS
FROM [Cube1]
WHERE ( [Measures].[Labour %] )
here [Last Year] is a calculated set
[Last Year]=====
{STRTOMEMBER("[Date].[Month].&["+ cstr(year(now())-2) +"-11-01T00:00:00]"):
(STRTOMEMBER("[Date].[Month].&["+ cstr(year(now())-1) +"-10-01T00:00:00]"))}
2nd query:
WITH MEMBER [Measures].[Budget ] AS IIF(avg([Last Year],IIF(([Measures].[Budget]>0),[Measures].[Budget],null)),
avg([Last Year],IIF(([Measures].[Budget]>0),[Measures].[Budget],null)),0.00),
MEMBER [Measures].[YTD] AS IIF(avg([Last Year], IIF(([Measures].[Labour %]>0),[Measures].[Labour %],null))<>null,
avg([Last Year], IIF(([Measures].[Labour %]>0),[Measures].[Labour %],null)),0.00),
FORMAT_STRING = "Standard",
BACK_COLOR = CASE WHEN [YTD] = 0 THEN /*White*/16777215 /*White*/
WHEN [YTD] <= [Measures].[Budget ] THEN 65408
WHEN [YTD]<= [Measures].[Budget ] +5 THEN 65535
WHEN [YTD]> [Measures].[Budget ] +5 THEN 255
END,
VISIBLE = 1
SELECT
{ [Measures].[YTD], [Measures].[Budget ] }
ON COLUMNS,
{ { [Location].[Location].&[7], [Location].[Location].&[12], [Location].[Location].&[11], [Location].[Location].&[19], [Location].[Location].&[17], [Location].[Location].&[16], [Location].[Location].&[9], [Location].[Location].&[18] },{[Location].[Location].[All]} }
ON ROWS
FROM [Cube1]
**here ==> [Measures].[YTD], [Measures].[Budget ] are calculated member i want result like in
coulmns===> ytd,budget,nov,dec,jan,feb.,,,,,,,,,,october and rows ====> locations and total(average of all locations)
please guide me to get solution like mdx query**