I am learning on the job. I have a table of minutes spend in each bed. I want to calculate percentage utilisation of the beds. I have created the calculated member in my cube in SSAS 2008
CREATE MEMBER CURRENTCUBE.[Measures].UtilisationPercent
AS avg(
crossjoin(
descendants([bedlabel].[hierarchy].currentmember, [Bedlabel].[Bedlabel])
,descendants([Date].[date].currentmember, [Date].[Day])
)
,[Measures].[Utilisation Mins]
)
/ (24*60),
FORMAT_STRING = "Percent",
NON_EMPTY_BEHAVIOR = { [Utilisation Mins] },
VISIBLE = 1 , ASSOCIATED_MEASURE_GROUP = 'Bedstay' ;
This actually works fine if i slice by year/month or ward/bed.
But the total utilisation shown in the cube browser is wrong. How can i control the way the utilisation total is calculated? Can i create a calculated member in a way that the crossjoin will work at a higher level than leaf?
January 2011 Utilisation %
Bed1 98.86%
Bed2 88.38%
Bed3 82.63%
Bed4 94.67%
Bed5 85.82%
Bed6 93.53%
Bed7 78.78%
Bed8 85.43%
Bed9 91.16%
Bed10 90.93%
Bed11 92.00%
Total 894.35% <--- this is way too wrong.
-- added after MEZ's comment
Ok, thanks for the tip. I tried scoped assignment following this
SCOPE([Measures].[Utilisation Percentage]);
SCOPE([Date].[Date].MEMBERS);
SCOPE([bedlabel].[hierarchy].MEMBERS);
THIS = [Measures].[Utilisation Mins] /
(60*24
* count(descendants([bedlabel].[hierarchy].currentmember, [Bedlabel].[Bedlabel]))
* count(descendants([Date].[date].currentmember, [Date].[Day]))) ;
END SCOPE;
END SCOPE;
END SCOPE;
I got the same results as with the crossjoin method. I do not see a difference in AS2008 between scoped assignment result and my old crossjoin method? And it still totals up in surreal numbers that i cannot explain.
This is a permutation of what Sourav_Agasti suggested and it works now. I think the avg + the nonemptycrossjoin worked better than avg + coalesceempty.
CREATE MEMBER CURRENTCUBE.[Measures].UtilisationPercent
AS avg( nonemptycrossjoin(
descendants([bedlabel].[hierarchy].currentmember,[bedlabel].[hierarchy].[Bedlabel])
,descendants([Date].[date].currentmember,[date].[date].[day]))
, [Measures].[Utilisation Mins]/ (24*60)),
FORMAT_STRING = "Percent",
NON_EMPTY_BEHAVIOR = { [Utilisation Mins] },
VISIBLE = 1 , ASSOCIATED_MEASURE_GROUP = 'Bedstay';
This also worked, based on MEZ's suggestion.
SCOPE([Measures].[Utilisation Percentage]);
scope ([bedlabel].[hierarchy].members);
scope ([date].[date].members);
this = avg( nonemptycrossjoin(
descendants([bedlabel].[hierarchy].currentmember,[bedlabel].[hierarchy].[Bedlabel])
,descendants([Date].[date].currentmember,[date].[date].[day]))
, [Measures].[Utilisation Mins]/ (24*60)) ;
non_empty_behavior (this) = [Utilisation Mins] ;
end scope;
end scope;
END SCOPE;
The difference to AS2000 is that i only have to do this, plus specify average as the aggregation method on the calculated measure. I also didn't have multiple hierarchy. The syntax seems much simpler to me.
avg(nonemptycrossjoin(descendants([Unit].currentmember,[Unit].[Bed label]),descendants([Date].currentmember,[date].[day])), [Measures].[Utilisation Min]/ (24*60)) * 100'
Thank you for all who tried to help!
It could be because the empty tuples are creating issues. Using CoalesceEmpty function will replace EMPTY cells with a 0. Try the code below:
CREATE MEMBER CURRENTCUBE.[Measures].UtilisationPercent
AS avg( crossjoin(descendants([bedlabel].[hierarchy].currentmember, [Bedlabel].[Bedlabel]),
descendants([Date].[date].currentmember, [Date].[Day])), CoalesceEmpty([Measures].[Utilisation Mins], 0) )
/ (24*60),
FORMAT_STRING = "Percent",
NON_EMPTY_BEHAVIOR = { [Utilisation Mins] },
VISIBLE = 1 , ASSOCIATED_MEASURE_GROUP = 'Bedstay' ;
Since the AVG doesn't seem to be working, check the below script out too:
CREATE MEMBER CURRENTCUBE.[Measures].a
as
SUM(
(descendants([bedlabel].[hierarchy].currentmember, [Bedlabel].[Bedlabel]) * descendants([Date].[date].currentmember, [Date].[Day])),
[Measures].[Utilisation Mins]),
NON_EMPTY_BEHAVIOR = { [Utilisation Mins] },
VISIBLE = 1 , ASSOCIATED_MEASURE_GROUP = 'Bedstay' ;
CREATE MEMBER CURRENTCUBE.[Measures].b
as
COUNT(
(descendants([bedlabel].[hierarchy].currentmember, [Bedlabel].[Bedlabel]) * descendants([Date].[date].currentmember, [Date].[Day]))
,EXCLUDEEMPTY
),
NON_EMPTY_BEHAVIOR = { [Utilisation Mins] },
VISIBLE = 1 , ASSOCIATED_MEASURE_GROUP = 'Bedstay' ;
CREATE MEMBER CURRENTCUBE.[Measures].C
AS
[Measures].A/[Measures].B,
FORMAT_STRING = "Percent",
NON_EMPTY_BEHAVIOR = { [Utilisation Mins] },
VISIBLE = 1 , ASSOCIATED_MEASURE_GROUP = 'Bedstay' ;
Not an answer but maybe a way to dig into what is happening.
Please try adding the following measure:
CREATE MEMBER CURRENTCUBE.[Measures].UtilisationCount
AS Count(
crossjoin(
descendants([bedlabel].[hierarchy].currentmember, [Bedlabel].[Bedlabel])
,descendants([Date].[date].currentmember, [Date].[Day])
)
Then in your query add this new measure, on columns, hopefully x,y,z,j,q will be some numbers - what is q?:
January 2011 UtilisationCount Utilisation %
Bed1 x 98.86%
Bed2 y 88.38%
Bed3 z 82.63%
Bed4 j 94.67%
Total q 894.35%
Related
I am relatively new to SSAS MDX and am facing the problem to create aggregates over all measures of different dimension members.
The following picture best describes what I'm trying to achieve:
Problem and What the solution should be
This is a draft and a simplification of a more complex scenario, so don't bother ;-).
After running a series of experiments I figured out to use a simple dimension without connection to other dimensions to be able to use the SCOPE statement to override the produced results in the report.
The simple dimension "Kurz PuL" contains the preceding members (Umsatz .. Periodenergebnis) and shall produce the Profits + Loss report.
Kurz PuL Dimension
What currently works is to show results of single members (like Umsatz, Wareneinsatz, SbA, Personal).
But I am not able to aggregate values of more than one member to obtain an aggregate, e.g.: of Umsatz + Wareneinsatz = Rohertrag. I tried different approaches but none worked.
See the following SCOPE statements which are used to "override" the resulting values that are displayed in Excel (first image ^^):
SCOPE Statements:
/*
The CALCULATE command controls the aggregation of leaf cells in the cube.
If the CALCULATE command is deleted or modified, the data within the cube is affected.
You should edit this command only if you manually specify how the cube is aggregated.
*/
CALCULATE;
SCOPE ([Kurz PuL].[Calculated].[Umsatz]);
THIS = AGGREGATE([EinfacheBwaZeile].[Hierarchy].&[U]);
END SCOPE;
SCOPE ([Kurz PuL].[Calculated].[Wareneinsatz]);
THIS = AGGREGATE([EinfacheBwaZeile].[Hierarchy].&[W]);
END SCOPE;
/* DOES NOT WORK: */
SCOPE ([Kurz PuL].[Calculated].[Rohertrag]);
THIS = AGGREGATE(FILTER([EinfacheBwaZeile].[Hierarchy].CurrentMember, { [EinfacheBwaZeile].[Hierarchy].&[U], [EinfacheBwaZeile].[Hierarchy].&[W] }));
END SCOPE;
SCOPE ([Kurz PuL].[Calculated].[Personal]);
THIS = AGGREGATE( { [EinfacheBwaZeile].[Hierarchy].&[P] });
END SCOPE;
SCOPE ([Kurz PuL].[Calculated].[Marketing]);
THIS = AGGREGATE( { [EinfacheBwaZeile].[Hierarchy].&[M] });
END SCOPE;
/* DOES NOT WORK: */
SCOPE ([Kurz PuL].[Calculated].[Deckungsbeitrag]);
THIS = AGGREGATE( { [EinfacheBwaZeile].[Hierarchy].&[U], [EinfacheBwaZeile].[Hierarchy].&[W], [EinfacheBwaZeile].[Hierarchy].&[R], [EinfacheBwaZeile].[Hierarchy].&[P]
, [EinfacheBwaZeile].[Hierarchy].&[M], [EinfacheBwaZeile].[Hierarchy].&[D] });
END SCOPE;
SCOPE ([Kurz PuL].[Calculated].[SbA]);
THIS = AGGREGATE( { [EinfacheBwaZeile].[Hierarchy].&[S] });
END SCOPE;
/* DOES NOT WORK: */
SCOPE ([Kurz PuL].[Calculated].[EBITDA]);
THIS = AGGREGATE( { [EinfacheBwaZeile].[Hierarchy].&[U], [EinfacheBwaZeile].[Hierarchy].&[W], [EinfacheBwaZeile].[Hierarchy].&[R], [EinfacheBwaZeile].[Hierarchy].&[P]
, [EinfacheBwaZeile].[Hierarchy].&[M], [EinfacheBwaZeile].[Hierarchy].&[D]
, [EinfacheBwaZeile].[Hierarchy].&[S], [EinfacheBwaZeile].[Hierarchy].&[A] });
END SCOPE;
/* DOES NOT WORK: */
SCOPE ([Kurz PuL].[Calculated].[EBIT]);
THIS = AGGREGATE( { [EinfacheBwaZeile].[Hierarchy].&[U], [EinfacheBwaZeile].[Hierarchy].&[W], [EinfacheBwaZeile].[Hierarchy].&[R], [EinfacheBwaZeile].[Hierarchy].&[P]
, [EinfacheBwaZeile].[Hierarchy].&[M], [EinfacheBwaZeile].[Hierarchy].&[D]
, [EinfacheBwaZeile].[Hierarchy].&[S], [EinfacheBwaZeile].[Hierarchy].&[A]
, [EinfacheBwaZeile].[Hierarchy].&[I] });
END SCOPE;
/* DOES NOT WORK: */
SCOPE ([Kurz PuL].[Calculated].[EBT]);
THIS = AGGREGATE( { [EinfacheBwaZeile].[Hierarchy].&[U], [EinfacheBwaZeile].[Hierarchy].&[W], [EinfacheBwaZeile].[Hierarchy].&[R], [EinfacheBwaZeile].[Hierarchy].&[P]
, [EinfacheBwaZeile].[Hierarchy].&[M], [EinfacheBwaZeile].[Hierarchy].&[D]
, [EinfacheBwaZeile].[Hierarchy].&[S], [EinfacheBwaZeile].[Hierarchy].&[A]
, [EinfacheBwaZeile].[Hierarchy].&[I]
, [EinfacheBwaZeile].[Hierarchy].&[T] });
END SCOPE;
/* DOES NOT WORK: */
SCOPE ([Kurz PuL].[Calculated].[Periodenergebnis]);
THIS = AGGREGATE( { [EinfacheBwaZeile].[Hierarchy].&[U], [EinfacheBwaZeile].[Hierarchy].&[W], [EinfacheBwaZeile].[Hierarchy].&[R], [EinfacheBwaZeile].[Hierarchy].&[P]
, [EinfacheBwaZeile].[Hierarchy].&[M], [EinfacheBwaZeile].[Hierarchy].&[D]
, [EinfacheBwaZeile].[Hierarchy].&[S], [EinfacheBwaZeile].[Hierarchy].&[A]
, [EinfacheBwaZeile].[Hierarchy].&[I]
, [EinfacheBwaZeile].[Hierarchy].&[T]
, [EinfacheBwaZeile].[Hierarchy].&[E] });
END SCOPE;
I've been trying to find a resource that explains how to aggregate on more than one member but didn't find a solution.
How can I use the AGGREGATE() function to combine/sum values that are related to multiple dimension members of [EinfacheBwaZeile].[Hierarchy].A, … .B, … .C ?
I really appreciate your answers!
Thanks in advance,
Cordt
-- UPDATE 2019-05-28 as reply to Moaz as of 2019-05-27: --
Hi Moaz,
thank you for your suggestion.
Sadly, that solution does not meet my needs.
First thing to notice is, that I need a SCOPE-Statement, not a SELECT-MDX.
Second, I need all the measures of specific members of another dimension to be "summarized". That looks at first sight like a "running total" but it depends on the values of "previous" members where some may be skipped.
In words of the Adventure Works sample, the following shows what I need:
SCOPE (MountainBikeSales);
THIS = AGGREGATE(Product.&[Bikes]);
END SCOPE;
SCOPE (BikesAndAccessories);
THIS = AGGREGATE({ Product.&[Bikes], Product.&[Accessories] });
END SCOPE;
SCOPE (BikesAccsClothing);
THIS = AGGREGATE({ Product.&[Bikes], Product.&[Accessories], Product.&[Clothing] });
END SCOPE;
Is that more clear?
You could even think of a SCOPE that skips Accessories by summarizing Bikes and Clothing instead of Accessories.
Problem to me is, that the first statement would succeed (that summarizes a single member) but the others won't.
Thank you for your advice!
Cordt
I am not sure that i understand your problem exactly. But I think you want to know how to calculate running totals. It that is the case take a look at the below example
with
member
[Measures].[Internet Sales AmountRunningtotal]
as
case when [Measures].[Internet Sales Amount] = null then null
else
sum({[Product].[Subcategory].firstchild:[Product].[Subcategory].currentmember},[Measures].[Internet Sales Amount])
end
select {[Measures].[Internet Sales Amount],
[Measures].[Internet Sales AmountRunningtotal]
} on columns,
non empty
([Date].[Calendar Year].[Calendar Year],[Date].[Calendar Quarter of Year].[Calendar Quarter of Year],
[Product].[Category].[Category],[Product].[Subcategory].[Subcategory])
on
rows
from
[Adventure Works]
Result
Edit:Based on your edit
select
{
[Measures].[Internet Sales Amount],
[Measures].[Internet Order Quantity],
[Measures].[Internet Tax Amount],
[Measures].[Internet Gross Profit Margin]
}on 0 ,
[Product].[Category].[Category]
on 1
from
[Adventure Works]
Results
Notice that all measures for Components have null values. Now Lets equate Components with Bikes & Accessories
Scope ([Product].[Category].&[2]) ;
this = (aggregate({[Product].[Category].&[1],[Product].[Category].&[4]},[Measures].[Measures].currentmember));
end scope;
select
{
[Measures].[Internet Sales Amount],
[Measures].[Internet Order Quantity],
[Measures].[Internet Tax Amount],
[Measures].[Internet Gross Profit Margin]
}on 0 ,
[Product].[Category].[Category]
on 1
from
[Adventure Works]
Results
I have an MDX Query running on the SSAS cube that returns lots of object codes and the period balances for them. I was able to add multiple period balances by using a crossjoin on the rows, however I would like to add one more row with the period end balance for the last fiscal period, and can't seem to figure out a way to do it.
The initial query is
select
non empty
{
[Object Code].[Object Code Number].[Object Code Number]
*
[Object Code].[Object Code Description].[Object Code Description]
*
[Object Code Pathing 1E 1R].[1E_R1 Value].[1E_R1 Value]
*
[Object Code Pathing 1E 1R].[1E_R2 Value].[1E_R2 Value]
*
[Object Code Pathing 1E 1R].[1E_R3 Value].[1E_R3 Value]
*
[Object Code Pathing 1E 1R].[1E_R4 Value].[1E_R4 Value]
}
on rows,
{
[Measures].[Current Period Balance]
}
*
{
[Date].[Fiscal].[Fiscal Period].&[2016]&[1]:[Date].[Fiscal].[Fiscal Period].&[2016]&[7]
}
on columns
from [Finance]
and when I am trying to add one more column
select
non empty
{
[Object Code].[Object Code Number].[Object Code Number]
*
[Object Code].[Object Code Description].[Object Code Description]
*
[Object Code Pathing 1E 1R].[1E_R1 Value].[1E_R1 Value]
*
[Object Code Pathing 1E 1R].[1E_R2 Value].[1E_R2 Value]
*
[Object Code Pathing 1E 1R].[1E_R3 Value].[1E_R3 Value]
*
[Object Code Pathing 1E 1R].[1E_R4 Value].[1E_R4 Value]
}
on rows,
{
[Measures].[Balance At Period End]
*
[Date].[Fiscal].[Fiscal Period]&[2016]&[7]
},
{
[Measures].[Current Period Balance]
}
*
{
[Date].[Fiscal].[Fiscal Period].&[2016]&[1]:[Date].[Fiscal].[Fiscal Period].&[2016]&[7]
}
on columns
from [Finance]
I get the
Parser: The statement dialect could not be resolved due to ambiguity. error
and if I add it like
{
[Measures].[Current Period Balance],
[Measures].[Balance At Period End]
}
*
{
[Date].[Fiscal].[Fiscal Period].&[2016]&[1]:[Date].[Fiscal].[Fiscal Period].&[2016]&[7]
}
on columns
I get Period end Balances for all periods, and this is not needed in the report, I only need the Balance at Period End for the very last period
Here is your first piece of troublesome code:
crossjoin (
[Measures].[Current Period Balance]
,{
[Date].[Fiscal].[Fiscal Period].&[2016]&[1]
,[Date].[Fiscal].[Fiscal Period].&[2016]&[2]
,[Date].[Fiscal].[Fiscal Period].&[2016]&[3]
}
), //<<1
crossjoin(
[Measures].[Balance At Period End]
,{[Date].[Fiscal].[Fiscal Period].&[2016]&[3]}
) on columns
from [Finance]
At point 1 you have closed the first crossjoin and then put a comma - this is a syntax error.
You could try moving that brace from 1 to the end of the statement:
crossjoin (
[Measures].[Current Period Balance]
,{
[Date].[Fiscal].[Fiscal Period].&[2016]&[1]
,[Date].[Fiscal].[Fiscal Period].&[2016]&[2]
,[Date].[Fiscal].[Fiscal Period].&[2016]&[3]
}
, //<<1
crossjoin(
[Measures].[Balance At Period End]
,{[Date].[Fiscal].[Fiscal Period].&[2016]&[3]}
)
) on columns //<<now closing initial crossjoin here
from [Finance]
Ok I just tested the above via the following and it is not a valid approach:
SELECT
CrossJoin
(
[Measures].[Internet Sales Amount]
,{
[Date].[Calendar].[Date].&[20060628]
,[Date].[Calendar].[Date].&[20060629]
}
,CrossJoin
(
[Measures].[Internet Order Quantity]
,{[Date].[Calendar].[Date].&[20060629]}
)
) ON COLUMNS
,[Product].[Product Categories].[All] ON ROWS
FROM [Adventure Works];
We get the following error:
Query (2, 3) The Measures hierarchy is used more than once in the
Crossjoin function.
You could switch to the following structure, creating a set of tuples. This does run:
SELECT
{
[Measures].[Internet Sales Amount]
*
{
[Date].[Calendar].[Date].&[20060628]
,[Date].[Calendar].[Date].&[20060629]
}
,(
[Measures].[Internet Order Quantity]
,{[Date].[Calendar].[Date].&[20060629]}
)
} ON COLUMNS
,[Product].[Product Categories].[All] ON ROWS
FROM [Adventure Works];
Result:
I am using Built in time intelligence feature and I would like to calculate measures for the Full Year.
Eg if current member of date is at 2015/03/01; I want to have a calculated measure from 2015/01/01 till 2015/12/31.
CREATE MEMBER CurrentCube.[DimTime].[FY-FQ-FM DimTime Calculations].[Full Year] AS "NA" ;
(
[DimTime].[FY-FQ-FM DimTime Calculations].[Year to Date]
, [DimTime].[Fiscal Year].[Fiscal Year].Members
, [DimTime].[Date].Members
, { [Measures].[Forecasts], [Measures].[Budget] }
)
= Aggregate(
{ [DimTime].[FY-FQ-FM DimTime Calculations].[Current DimTime] }
* PeriodsToDate(
[DimTime].[FY-FQ-FM].[Fiscal Year]
, [DimTime].[FY-FQ-FM].CurrentMember
)
) ;
Thanks #whytheq and #AkshayRane for the help.
I was able to do the full year using below.
(
[DimTime].[FY-FQ-FM DimTime Calculations].[Full Year],
[DimTime].[Fiscal Year].[Fiscal Year].Members,
[DimTime].[Date].Members,
{
[Measures].[Forecasts],
[Measures].[Budget]
}
)
=
Aggregate(
{ [DimTime].[FY-FQ-FM DimTime Calculations].[Current DimTime] }
*
PeriodsToDate(
[DimTime].[FY-FQ-FM].[Fiscal Year],
(
ANCESTOR(
[DimTime].[FY-FQ-FM].CURRENTMEMBER,
[DimTime].[FY-FQ-FM].[Fiscal Year]
)
)
)
)
I have this MDX query
select
{
[Measures].[Sold value]
,[Measures].[Units]
,[Measures].[Sales baskets]
,[Measures].[ATV]
,[Measures].[AUT]
} on columns
, filter(
nonempty(
{[Branch].[Branch].&[5] *[Receipt No - Sales].[Receipt No].[Receipt No]}
),
[Measures].[Sold value] >= 50
) on rows
from Rmis
where [Time].[Day].&[20131218]
Which generates following result:
How can I get the total of these measures of the above result set? The total should use the aggregation defined in the cube.
with set [rows] as
filter(
nonempty(
{[Branch].[Branch].&[5] *[Receipt No - Sales].[Receipt No].[Receipt No]}
),
[Measures].[Sold value] >= 50
)
member [Receipt No - Sales].[Receipt No].[Total] as
aggregate([rows])
select
{
[Measures].[Sold value]
,[Measures].[Units]
,[Measures].[Sales baskets]
,[Measures].[ATV]
,[Measures].[AUT]
} on columns
,
{ ([Branch].[Branch].&[5], [Receipt No - Sales].[Receipt No].[Total]) }
+
[rows]
on rows
from Rmis
where [Time].[Day].&[20131218]
I am attempting to implement paging to large datasets in MDX (SSAS).
I have the following to retrieve paged data which works fine:
SELECT
{
[Measures].[Mesasure1],
[Measures].[Measure2]
} ON COLUMNS,
SUBSET
(
ORDER
(
{
(
[Item].[Category].ALLMEMBERS
)
}, NULL, BASC
), 10, 50 --10 = start index, 50 = returned roes
)
ON ROWS
FROM ( SELECT ( { [Time].[Date].&[2012-04-15T00:00:00]:[Time].[Date].&[2012-04-20T00:00:00] } ) ON COLUMNS
FROM [DataMartPerformance]
))
However I cannot for the life of me find anywhere on the internet that helps explain how to get the total rows available. Do I do it in a seperate query? If so how?
Or can I wrap it into this one query somehow?
Similar to how you'd do TSQL paging, you'll need to run another query to count the total elements. You may have to tinker with this depending on how you've done your original query, but I use something like:
WITH
MEMBER [Measures].[ElementCount] AS
{
NONEMPTY
(
{
[Item].[Category].ALLMEMBERS *
{ [Time].[Date].&[2012-04-15T00:00:00]:[Time].[Date].&[2012-04-20T00:00:00] }
},
{
[Measures].[Mesasure1],
[Measures].[Measure2]
}
)
}.COUNT
SELECT
{
[Measures].[ElementCount]
}
ON COLUMNS
FROM
[DataMartPerformance]
For filtering, you can do dimension filters by using an exists against your dimension attributes:
WITH
MEMBER [Measures].[ElementCount] AS
{
NONEMPTY
(
EXISTS
(
{
[Item].[Category].ALLMEMBERS *
{ [Time].[Date].&[2012-04-15T00:00:00]:[Time].[Date].&[2012-04-20T00:00:00] }
},
{
[Dimension].[Attribute].[FilterByThisAttribute]
}
),
{
[Measures].[Mesasure1],
[Measures].[Measure2]
}
)
}.COUNT
SELECT
{
[Measures].[ElementCount]
}
ON COLUMNS
FROM
[DataMartPerformance]
I haven't got to writing the measure value filters yet, I need to do that next for my own MDX paging constructor...
Please try this:
WITH
SET MySet As
(
NONEMPTY (
[AU Time Sale Hour].[Hour Key].[Hour Key]
* [Dim Country].[Country Key].[Country Key]
)
)
Member [Measures] .cnt AS MySet.Count
select [Measures] .cnt on Columns
from [Me Stats DW Fact Sales]
where (
{[Dim Visa].[Visa Key].&[2067],[Dim Visa].[Visa Key].&[2068] },
[AU Time Sale Date].[Date].&[20091120]:[AU Time Sale Date].[Date].&[20091125]
)