I am trying to sort a view based on the totals. I have a view that is categorised by branch name but I want to sort it so I have the top 5 branches. I have created a total column which works fine but I now want to sort the view by the total.
I have tried having the total column as the first column but it ignores it and uses the next column to categorise documents.
What am I doing wrong? I just want to sort the documents by the total column, this has got to be possible surely?
Subject: Sorting a view based on Totals…This is possible isn’t it?
No, it’s not possible, as the view needs to be sorted to order the documents into the correct category. Then you would need a second sort using the category totals to reorder every record in the view.
Subject: Sorting a view based on Totals…This is possible isn’t it?
Yes - this is possible, I’ve got it working fine. Make sure that the first column is sorted, and not categorised, plus make sure that numeric values only are returned. You can hide it too if u like. The next column should be your categorised one.
If it’s still not working, then check if the column property ‘programatic value’ is unique (the last tab for the column property) - this can have a bearing if the column was copy pasted.
Subject: RE: Sorting a view based on Totals…This is possible isn’t it?
Ah - Now that’s not going to work - I thought that u had a column which showed a total field from the document itself. If you think about it, the first column is trying to sort by the value - and each time it goes to get a vlue, it get ‘1’, which means it hands over the sort to the category column…
The only way that this will work is if you have a total field which is contained in the document! Maybe you need to rethink your approach…
Subject: RE: Sorting a view based on Totals…This is possible isn’t it?
Ultimately I need to find the top 5 sites created in a month. My approach was to have a view containing just the documents created in the current month and have these docs categorised by site. Then have a total column and sort the view by this column not the categorised Site column.
I need this information to go into a monthly report.
Subject: RE: Sorting a view based on Totals…This is possible isn’t it?
Katharine,
I’ve faced this issue on many occasions, and my methodology for resolving it has been the same in each case. What I invariably do is create a summary document which will hold summary (total) values for the documents you wish to group and total. This is the document which would be presented in the view. Since the total(s) would be a value(s) on the document itself, you could sort against it/them to your heart’s content.
Should you wish to retain the detail documents in the view selection, you could then consider making them responses to the summary documents and displaying responses as well.
Subject: RE: Sorting a view based on Totals…This is possible isn’t it?
You need to build the report by hand. You can create a report document, and display it for printing, etc. The report document should contain fields which aggregate the values that you need.
Try and find something on the Sandbox - there are a few ‘report’ templates that you may find useful.