Sharepoint List- count Unique list items?
Hi, I have a list of a employee assigned to multiple projects.so,multiple records has created.i am trying to create a view to display the unique employee count in the list.. Can any one tell the possibility solution for this?Thanks & Regards, Sruthi
December 15th, 2010 12:53am

Use "Totals" option in SharePoint list view.Thanks & Regards, Neerubee
Free Windows Admin Tool Kit Click here and download it now
December 15th, 2010 12:58am

yeah ,i used it..it is taking the repeated employee for the count..it is not taking unique itemThanks & Regards, Sruthi
December 15th, 2010 1:33am

hello list views are based on CAML. You need some sort of DISTINCT operator for list items (e.g. distinct employee id). Unfortunately CAML doesn't have such operator, so I think it is not possible in list view as well. However it is not hard to make it programmatically. Check this link: What is the best way to retrieve distinct / unique values using SPQuery? . Hope it will help youBlog - http://sadomovalex.blogspot.com CAML via C# - http://camlex.codeplex.com Graphs visualization in Sharepoint - http://spgraphviz.codeplex.com
Free Windows Admin Tool Kit Click here and download it now
December 15th, 2010 1:12pm

hello list views are based on CAML. You need some sort of DISTINCT operator for list items (e.g. distinct employee id). Unfortunately CAML doesn't have such operator, so I think it is not possible in list view as well. However it is not hard to make it programmatically. Check this link: What is the best way to retrieve distinct / unique values using SPQuery? . Hope it will help youBlog - http://sadomovalex.blogspot.com CAML via C# - http://camlex.codeplex.com Graphs visualization in Sharepoint - http://spgraphviz.codeplex.com
December 15th, 2010 1:12pm

Hi, There is a simlar thread can help you:http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/fb5a42b9-5791-4f75-b9a0-6062b75b5e05/Xue-Mei Chang
Free Windows Admin Tool Kit Click here and download it now
December 16th, 2010 1:51pm

Hi, Yeah i No,By using Totals options ,It is counting the record twice For Example: ColumnA Column B Apple Fruit Apple Fruit Strawberry Fruit Count is dipalying 3 By using Totals Option But the count is 2 since there are two fruits.While counting the list items it has not to take the repeated column records Is that possible.? Thanks & Regards, Sruthi
December 17th, 2010 1:26am

Did you try LINQ? E.g. var designations = from SPListItem employee in employees select new {Designation = employee["Employee Designation"].ToString().Distinct()}; Regards Prasad
Free Windows Admin Tool Kit Click here and download it now
December 18th, 2010 8:13pm

Did you try LINQ? E.g. var designations = from SPListItem employee in employees select new {Designation = employee["Employee Designation"].ToString().Distinct()}; Regards Prasad
December 18th, 2010 8:13pm

You're going to need SharePoint Designer or Content Query Webpart. SharePoint Solution Architect, Developer
Free Windows Admin Tool Kit Click here and download it now
December 25th, 2010 11:20pm

To achieve this requirement you should use a query web part. There is no option available to create such kind of view in the SharePoint list. Senthilrajan Kaliyaperumal
December 27th, 2010 12:35am

To achieve this requirement you should use a query web part. There is no option available to create such kind of view in the SharePoint list. Senthilrajan Kaliyaperumal
Free Windows Admin Tool Kit Click here and download it now
December 27th, 2010 12:35am

To achieve this requirement you should use a query web part. There is no option available to create such kind of view in the SharePoint list. Senthilrajan Kaliyaperumal
December 27th, 2010 12:35am

Thanx all for your answers.Thanks & Regards, Sruthi
Free Windows Admin Tool Kit Click here and download it now
January 12th, 2011 1:46am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics