count - Get the number of records from MDX query with Subcubes -


i'm developing system generate mdx queries entity "filtercriterias" , related info number of records of query, need generic way number of records of mdx query use subcubes. in normal query like:

with    member [mycount]      count([date].[date].members)  select    {[mycount]} on 0 [adventure works]; 

but have problems when use way in queries little more complexes that

with    member [mycount]      count([date].[date].members)  select    {[mycount]} on 0  (   select      {[measures].[sales amount]} on 0    ,{[date].[date].&[20050701] : [date].[date].&[20051231]} on 1      (     select        {[sales channel].[sales channel].&[internet]} on 0     [adventure works]   ) ); 

i guess logic response number of records of [date].[members] left in subcube, result without columns , rows. i'm newbie in mdx language , don't understand behavior. exists generic way number of records "base" query select count(*) () in plain sql?

the structure quite different ralational select count(*) ().

i believe structure of sub-select similar of sub-cube , reading through definition msdn (https://msdn.microsoft.com/en-us/library/ms144774.aspx) of sub-cube contains tells isn't straight filter in relational query:

enter image description here

admittedly still find behaviour rather "enigmatic" (a polite way of saying "i not understand it")

is there workaround?


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -