Thursday, July 24, 2014

MDX Query - Count Level Zero Members

In one of our implementation I wanted to know the number of level zero members in a dimension and after some research finally ended up having following MDX query:

WITH
Member [Product].[ProCount] AS 'Count([Product].Levels(0).members)'
SELECT {[Year]} on AXIS(0),
{[Product].[ProCount]} on Axis(1)
FROM [Sample.Basic];

No comments:

Post a Comment