Database Reference
In-Depth Information
MEMBER
[Geography].[HasAttribute] AS
'Count(Filter( [Geography].levels(0).members,
IsValid([Geography].CurrentMember.[Area Code])))'
MEMBER
[Geography].[Lev0Count] AS
'Count([Geography].Levels(0).members)'
SELECT {[Measures]} ON AXIS(0),
{[Geography].[NoAttribute], [Geography].[HasAttribute],
[Geography].[Lev0Count]} on AXIS(1)
FROM ASOSamp.Sample;
Axis-1 (Measures)
+-------------------+----------
(NoAttribute)
0.0000
(HasAttribute)
9398.0000
(Lev0Count)
9398.0000
notice that the ASoSamp application has all attributes associated properly. however,
if I edit the outline and remove the attribute from member [geography].[80101] and
rerun the query, I get the following results:
Axis-1 (Measures)
+-------------------+----------
(NoAttribute)
1.0000
(HasAttribute)
9397.0000
(Lev0Count)
9398.0000
I can now run the next query to identify the member that does not have an attribute
associated with it.
SELECT {} ON AXIS(0),
{Filter( [Geography].levels(0).members, NOT
IsValid([Geography].CurrentMember.[Area Code]))} on AXIS(1)
FROM ASOSamp.Sample;
Axis-1
+-------------------
(80101)
The next query is written to count the number of members tagged with the “major
market” uDA.
WITH
MEMBER
[Market].[MajorMarketCount] AS
'Count(UDA([Market], "Major Market"))'
SELECT {[Measures]} ON AXIS(0),
{[Market].[MajorMarketCount]} on AXIS(1)
FROM Sample.Basic;
Axis-1 (Measures)
+-------------------+----------
(MajorMarketCount)
10.0000
Search WWH ::




Custom Search