SSAS 2005 using count of dimension members as measure

  • Hi, I have a dimension for Accounts. These accounts have a start date

    for when they are first active and an end date for when they become

    classed as "Former Accounts". As "Former Accounts" they are still to

    be included in some reports so they are not inactive.

    At the moment I calculate the balance on each account using

    PreviousPeriod. To count the number of accounts with debit balances I

    use;

    Count(Filter(([Accounts].[Accounts].Members,[Measures].[Account

    Balances C Fwd]>0)

    To count the number of accounts with credit balances I use;

    Count(Filter(([Accounts].[Accounts].Members,[Measures].[Account

    Balances C Fwd]<0)

    To count the number of accounts with zero balances I use;

    Count(Filter(([Accounts].[Accounts].Members,[Measures].[Account

    Balances C Fwd]=0)

    And to count the total number of accounts I simply add the previous

    measures together.

    The issue is that the same number of Total Number of Accounts is

    returned each period even though I know new accounts are added each

    period. I think what might be happening is that in instances of

    accounts where no transactions exist prior to the date selected, and

    hence no balance has been calculated, the NULL balance is been treated

    as zero.

    Does this seem plausible? If I am correct how can I go about only

    counting those accounts where there is a balance?

    Thanks in advance for any suggestions or ideas.

    Bye for now

    Duncan :w00t:


    All the best,

    Duncan

  • The question that comes to mind is how is the context being set for the evaluation of the expressions. The balance will be evaluated in the context of the current query, but the query will determine if the timeframe is something other than All. Can you post the entire query that is being used?

    JW

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply