function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
qsdunnqsdunn 

Custom Report: Group Groups By Record Count

I have a custom report over Accounts, Assets and a custom object called Scores.

It's a summary report with data from the Scores being grouped (and summarised) by the name of the Account.

 

Where I'd like to go with it is: grouping the Accounts according to the numbers of Score grouped under them.

I realise the wording of that isn't very clear, so here are some diagrams.

 

I have a report that looks kinda like this:

 

                                                                     Date            Total Score

Account Name: AccountA  (Record Count 2)                               

                                                                 03/12/10              40%      

                                                                 15/08/10              30%      

Account Name: AccountB  (Record Count 1)                               

                                                                 17/08/10              55%     

Account Name: AccountC  (Record Count 2)                               

                                                                 27/09/09              25%      

                                                                 06/04/11              60%

 

And I want to juggle it around into something like this:

 

 

                                                                     Date            Total Score

Record Count: 2                                                                                

                                Account Name: AccountA                                 

                                                                 03/12/10              40%      

                                                                 15/08/10              30%      

                                Account Name: AccountC                               

                                                                 27/09/09              25%      

                                                                 06/04/11              60%     

Record Count: 1                                                                              

                               Account Name: AccountB                                

                                                                 17/08/10              55%     

 

 

If I could use a roll-up summary field on the Account (to count the child records) then I could use that to group by. However, the relationship between Account and Asset is not a Master-Detail relationship so I can't create a roll-up to do that.

I can put a custom summary field on the report, which subtotals the record counts but it can't be used to group the Accounts (because that would require it to be outside the proper context). I can't even use it to sort the Accounts which would be good enough for me (the only options are Ascending Account Name and Descending Account Name).

 

Is there any sort of work-around which can do this?