Averaging particular items to get an overall statusI'm having trouble articulating this so hopefully I make sense!  I have a list which contains project names, their associated manager, and the status.  What I am trying to do is have a listing of each manager and an overall status of their projects.  I want to take all of the projects, average the status field, and output this to a list or somehow display each manager and a single overall status field.  I'm drawing a blank on this, not even sure if it's possible.© 2009 Microsoft Corporation. All rights reserved.Tue, 14 Jul 2009 05:21:30 Z6f2d329c-abea-4813-8574-1a0ec9071deahttp://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/6f2d329c-abea-4813-8574-1a0ec9071dea#6f2d329c-abea-4813-8574-1a0ec9071deahttp://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/6f2d329c-abea-4813-8574-1a0ec9071dea#6f2d329c-abea-4813-8574-1a0ec9071deaMikey52http://social.msdn.microsoft.com/Profile/en-US/?user=Mikey52Averaging particular items to get an overall statusI'm having trouble articulating this so hopefully I make sense!  I have a list which contains project names, their associated manager, and the status.  What I am trying to do is have a listing of each manager and an overall status of their projects.  I want to take all of the projects, average the status field, and output this to a list or somehow display each manager and a single overall status field.  I'm drawing a blank on this, not even sure if it's possible.Mon, 29 Jun 2009 19:51:12 Z2009-06-29T19:51:12Zhttp://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/6f2d329c-abea-4813-8574-1a0ec9071dea#79c12ea3-3be6-475b-9378-8353b50feed7http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/6f2d329c-abea-4813-8574-1a0ec9071dea#79c12ea3-3be6-475b-9378-8353b50feed7Mike Walsh MVPhttp://social.msdn.microsoft.com/Profile/en-US/?user=Mike%20Walsh%20MVPAveraging particular items to get an overall statusMoving to Admin. Not site customization.<hr class="sig">WSS FAQ sites: <a href="http://wssv2faq.mindsharp.com">http://wssv2faq.mindsharp.com</a> and <a href="http://wssv3faq.mindsharp.com">http://wssv3faq.mindsharp.com</a> <br/>Total list of WSS 3.0 / MOSS 2007 Books (including foreign language) <a href="http://wssv3faq.mindsharp.com/Lists/v3 WSS FAQ/V Books.aspx">http://wssv3faq.mindsharp.com/Lists/v3%20WSS%20FAQ/V%20Books.aspx</a>Tue, 30 Jun 2009 06:14:57 Z2009-06-30T06:14:57Zhttp://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/6f2d329c-abea-4813-8574-1a0ec9071dea#091dde75-a79c-4573-854f-04d89b341240http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/6f2d329c-abea-4813-8574-1a0ec9071dea#091dde75-a79c-4573-854f-04d89b341240Mchova01http://social.msdn.microsoft.com/Profile/en-US/?user=Mchova01Averaging particular items to get an overall status<p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:small"><span style="font-family:Calibri">Hello Mikey52,</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:Calibri;font-size:small"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:small"><span style="font-family:Calibri">I ran into a similar situation recently.<span style="">  </span>We tied several combinations of creating an algorithm to support this, but ultimately decided on a bar chart to display the number of projects in each category (i.e. Red, Yellow, Green) and scaled the width of the table cell to be the percentage of the total.<span style="">  </span>The reason we went with this approach was due to how the value of projects were determined and using a waited average to display an overall status didn’t make sense from an end-user perspective. </span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:Calibri;font-size:small"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:small"><span style="font-family:Calibri">After the variables were defined, the XSL output was something like this:</span></span></p> <span style="font-size:small"><span style="font-family:Calibri"> <pre lang=x-xml>&lt;table&gt; &lt;tr&gt; &lt;xsl:if test=&quot;($GreenPercent*100)&amp;gt;'0'&quot;&gt;&lt;td width=&quot;{($GreenPercent*100)}%&quot; bgcolor=&quot;green&quot; align=&quot;center&quot;&gt;&lt;xsl:value-of select=&quot;$Green&quot; /&gt;&lt;/td&gt;&lt;/xsl:if&gt; &lt;xsl:if test=&quot;($YellowPercent*100)&amp;gt;'0'&quot;&gt;&lt;td width=&quot;{($YellowPercent*100)}%&quot; bgcolor=&quot;yellow&quot; align=&quot;center&quot;&gt;&lt;xsl:value-of select=&quot;$Yellow&quot; /&gt;&lt;/td&gt;&lt;/xsl:if&gt; &lt;xsl:if test=&quot;($RedPercent*100)&amp;gt;'0'&quot;&gt;&lt;td width=&quot;{($RedPercent*100)}%&quot; bgcolor=&quot;red&quot; align=&quot;center&quot;&gt;&lt;xsl:value-of select=&quot;$Red&quot; /&gt;&lt;/td&gt;&lt;/xsl:if&gt; &lt;/tr&gt; &lt;/table&gt;</pre> </span></span> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:Calibri;font-size:small"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:small"><span style="font-family:Calibri">All the best,</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:small"><span style="font-family:Calibri">Mike</span></span></p>Thu, 02 Jul 2009 17:31:58 Z2009-07-02T17:31:58Zhttp://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/6f2d329c-abea-4813-8574-1a0ec9071dea#c97956d9-5ae3-4048-85a7-c27bcf3eed04http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/6f2d329c-abea-4813-8574-1a0ec9071dea#c97956d9-5ae3-4048-85a7-c27bcf3eed04SP RAJhttp://social.msdn.microsoft.com/Profile/en-US/?user=SP%20RAJAveraging particular items to get an overall statusHi Mikey,<br/> <br/> As I understood that you have a list like<br/> <br/> <strong>Project Name           Manager              Status</strong> <br/> <br/> abc                              A                          50<br/> xyz                              B                          30<br/> mno                            C                          45<br/> pqr                              A                          70<br/> lkj                               C                          20 <br/> <br/> Manger can work on 'n' no.of projects<br/> <br/> What I mean to say is Create a custom webpart, populate <strong>Mangers</strong> column with distinct values (mangers can be duplicate) into a drop down list, then read the ddl values one by one, then using CAML query (&lt;OrderBy&gt;&lt;FieldRef Name='Manager' /&gt;&lt;FieldRef Name='Status' /&gt;&lt;/OrderBy&gt;&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name='Manager' /&gt;&lt;Value Type='Text'&gt;<strong>&lt;here goes your ddl value filled with manager names&gt;</strong> &lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;) get one managers data.<br/> <br/> Then after pick the <strong>Status</strong>   column value and sum the status value if the query count is 2 or more, then calculate average Total/No.of row count (store the sum and average in a variable)<br/> <br/> Then you can insert the row into a fresh custom list.<br/> <br/> Let me know in case if you have any queries.Fri, 03 Jul 2009 13:15:05 Z2009-07-03T13:15:55Z