One way to solve this is to add a table that defines your reporting periods. For example, create a table named Periods with two date fields named period_start and period_end and a calc field named month_year. Populate the table with one record for each period. Then you can use a correlated subquery to get the count for each of the reporting periods regardless of whether or not a particular salesperson has a record in each period.
Here's the calculation for the first series:
(SELECT COUNT(l.\"_k_ID_Location\" )
FROM location l
WHERE l.date_sale >= p.period_start
AND l.date_sale <= p.period_end
AND l.\"_id_salesperson\" = ?)
FROM periods p
WHERE period_start >= ? AND period_end <= ?"
; ""; ""; 1; Global::g_start; Global::g_end
Safe my life! I got the same issue! Thanks a lot! Greg.