|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Friday, February 08, 2013 7:11 AM
Points: 73,
Visits: 84
|
|
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 
All the best,
Duncan
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, June 22, 2012 9:58 AM
Points: 7,
Visits: 44
|
|
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
|
|
|
|