How to do a TopN Sort based on a formula
My report has two groups, Store and Department. In the details section are multiple jobs per store with costs. These are subtotalled by Store and Department. I want to compare total spend for each store with the store budget and produce a list of the Top 10 stores based on the percentage actual spend/budget.
My problem is I can only do a Top 10 sort on a summary field and I cannot summarise the percentage field as this is a formula which doesn't seem to allow summaries.
Any help much appreciated.
Graham Cunningham replied
Here are a couple of options.
1) Do the calcuations on the database (thru either a stored proc or command object).
2) Insert a crosstab where the rows are based on the Store and the summarized field is based on the formula that outputs the percentage of the actual vs budget as a Maximum. You can then do a TopN sort on the crosstab
Edited by: Graham Cunningham on Oct 10, 2008 8:27 AM