SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Im thinking of making a document libary with files that have a field "type_of_document" which gives the type of document e.g. "meeting notes". I wont make hem content types, just a column where multiple 'types' can be added for 1 file (in case the file contains multiple documents in one). Each of the documents is tied to a `collection´ number. The ´collection´ number is tied to multiple documents. I dont use document sets.

I now want to make a view where the content is categorized - ordered by that number.

Until so far that it is simple. But now: a certain amount of those 'type_of_document' will be required per 'collection number'. So now I want to place a percentage next to the 'collection number' based on the amount of 'type of document' entries matching the required list (this will probably be a workflow).

Would that be the best approach?

share|improve this question
up vote 0 down vote accepted

Create a DVWP, not a list view. You can edit the XSL to calculate the percentage. Here is an example from the Technet Forums

First, we should calculate the sum of the “count” column in the list. the formula is “ sum(/dsQueryResponse/Rows/Row/@Count) ”; Second, we should calculate the sum of the “count” column in every group. The formula is “ sum(/dsQueryResponse/Rows/Row[@Category=$thisNode/@Category]/@Count) ” Now, we can get the Percent of every group using “ format-number(sum(/dsQueryResponse/Rows/Row[@Category=$thisNode/@Category]/@Count) div sum( /dsQueryResponse/Rows/Row/@Count),'##.#% ')”

Replace @Category with @Type_of_document (i.e. the name of your column.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.