I have an open ticket with support on this. There really isn’t any answer to this except to allow DISTINCT COUNT in the code for measures. At this point they are not accommodating this. I hope they will figure out a way to allow this in the near future.
This is their explanation (so far), taken from an email I received from a support person:
The way Phocas sets up counts (other than line count) is in staging versus dynamically during a query. When you have an invoice that has 3 lines - we flag one of the lines at random as being reflective of an invoice count of 1. If you run a line level filter such as product that excludes the line with the flag set then you won’t return the invoice count of 1, you will return an invoice count of 0. When you expand this idea out to a large set of invoices you can see where many invoices might not be counted as a result of filtering on a product or other line level dimension.