Page 1 of 1

Counting non-zero Expressions

Posted: 16 Jul 2012, 19:24
by ilovesage
I'm a novice to Sage Report Designer, though I'd say I'm relatively experienced with computers. My approach to Sage Reports is similar to if I were using Excel/OpenOffice Calc. And I'm using Sage 50 Accounts 2010.
I'm trying to make a report that shows how many customers buy a specific product at least once.
Although it's a very tedious and clumsy way to do it, I thought I would get a report of all transactions, grouped by customer. Then I use CountIf(AUDIT_ACCOUNT.DETAILS = [the specific product]), called Expr1. This worked fine to give a total number for each customer. I then used the same code for the total in the report footer to get a total number of times the product has been purchased by anyone. However, I thought I would be able to count the number of Expr1s that are not zero, to find the number of unique purchasers of the product, with CountIf(Expr1>0). It generates a number, generally larger than the total number of times the product has been purchased so it's clearly not right.
Can anyone help with my problem? It would be even better if someone could tell me a neater, more intelligent way to do what I'm trying to do but, considering my experience with Sage in general, this seems unlikely.
Thanks for your help and sorry for my lack of clarity.

Re: Counting non-zero Expressions

Posted: 19 Jul 2012, 11:35
by brucedenney
I think I would need to see the report to comment. Perhaps you could attach it to a post.

I suspect that you are counting things more times than you think.

Perhaps your report includes splits/usages in the details section and you are counting a criteria based on the header/split multiple times.