Mismatch of SQL formulas in saved search results
Hello, I recently did a saved search which returns an array containing:
1) Collection forecasts by collection agent, representing the total amounts billed;
2) Realizations per collector, representing the amounts paid per collector;
3) The recovery rate, representing the sum of forecasts over the sum of achievements.
And this result is filtered by due date.
However, the following problem remains: the achievements are not sorted according to the chosen due date filter.
To overcome this, I wrote the following formula in order to have the results by due date filter. But it only works monthly.
But we want to be able to have the result by week, month, period and year.
Another problem is at the level of the total of the rate which does not correspond to the sum or even to the average of the recovery rates per agent.
How to overcome these problems and have the expected results please?