This report uses a TopN sort grouped by Company. It gathers a distinct count of unique units rented to that company.
So...
- If Company A rents Unit 100, the distinct unit count is 1.
- If Company A rents Unit 100, returns it, and later rents it again, the distinct unit count remains 1.
- If Company A rents Unit 100, returns it (or doesn't), and later rents unit 101, the distinct unit count becomes 2.
These scenarios are all correct and working fine. The problem I'm having is in totaling the distinct count. I'm attempting to total the distinct count results using a Running Total Field in the report summary.
An example of the problem occurs when Company A rents Unit 100, returns it, and Company B later rents the same unit.
Using that scenario, the group counts for each company are correct but the total for all companies (the report summary) is 1 when it should be 2.
I know this is because the Running Total in the report summary is also using distinct count...but I'm not sure how to get the correct results.