Count dimension members using SSAS Dynamic Management Views (DMV)
As you know, while running a query which counts dimension members the Management Studio do not return how many rows were returned. (for ex. select * from AW.[$Dim Product].[$Dim Product] where Color = ‘Red’ )
To solve this problem you can write a query like this:
WIth
MEMBER aas
([Dim name].[Attribute].
members).count
SELECT
a on 0
from
[$dim name]
===========================================
WITH
MEMBER aas
([Dates].[Date ID].
members).count
SELECT
a on 0
from
[$Dates]