Database Reference
In-Depth Information
use this query to return all members on the same level as the queried member.
SELECT {} ON AXIS(0),
{[Time].[Qtr1].Level.members} ON AXIS(1)
FROM [ASOsamp.Sample];
Axis-1
+-------------------
(Qtr1)
(Qtr2)
(Qtr3)
(Qtr4)
The following queries are the same as the queries above except they are based on
generation instead of Level.
SELECT {} ON AXIS(0),
{[Qtr1]} DIMENSION PROPERTIES [Time].[GEN_NUMBER] ON AXIS(1)
FROM [ASOsamp.Sample];
SELECT {} ON AXIS(0),
{[Time].[Qtr1].Generation.members} ON AXIS(1)
FROM [ASOsamp.Sample];
6.10.1.7 Counts Some very useful information can be derived using the Count() func-
tion. For instance, a developer or administrator may be interested in knowing how
many level-0 members are in a particular dimension. note that because we are now
generating a numerical result instead of just a list of members, we cannot use an empty
set on the column axis.
WITH
MEMBER
[Year].[YearMemberCount] AS
'Count([Year].Levels(0).members)'
SELECT {[Measures]} ON AXIS(0),
{[Year].[YearMemberCount]} on AXIS(1)
FROM Sample.Basic;
Axis-1 (Measures)
+-------------------+-------------------
(YearMemberCount) 12.00
This query will count the number of children for the specified member.
WITH
MEMBER
[Year].[YearChildrenCount] AS
'Count([Year].Children)'
SELECT {[Measures]} ON AXIS(0),
{[Year].[YearChildrenCount]} on AXIS(1)
FROM Sample.Basic;
Search WWH ::




Custom Search