Order Groups by the automatic Count number


When you make a Group in a View, you get a Count number next to the name of the value of the Field you grouped by. Is there any way to order those Groups not by the name of the group, but by the Count number?




I want to know how to do this so bad…so frustrating it’s not easily done.



You could possibly make a work around in a new formula field which counts the # of records by the grouping you are currently using, then you would group by this new formula field.

Just my initial thoughts - hope that’s helpful!



What would the formula be?



What are the records grouped by? :slight_smile:

The formula will likely depend on the type of data being used to group the records. Also, the count calculation by group would likely need to be done in a separate table (passing information from your table with the groups, to a linked record in another table which actually counts them, and back again) - so it’s not very friendly but a workaround more or less.

For example, if you were grouping by a linked record already, then your linked record table would have the count of records already built in, which you would then lookup in your original table to group by. Then it comes down to sorting by this group number and displaying it in a way that also shows your group name (e.g., “6 - Group 1”, “4 - Group 2”, etc.)



They are grouped by a text string under the column heading “Description” … there are about 600 unique ones across 6000 records

Yeah, not very friendly at all, not even sure how to get that done.




Ok, yeah, unfortunately for that level of data the workaround is not worth the extra effort. It’d still be doable, just not ideal.

I’ll add this to my community poll in case it gets it any more attention as a requested feature (I too would like to be able to sort by groups’ Count, etc. fields).

1 Like