Solved

Calculating Percentage of Checked Boxes on a Sharepoint List

Posted on 2008-10-22
7
627 Views
Last Modified: 2013-11-26
I have a SharePoint list that has several columns of the Yes/No datatype.  I am feeding the info from this list into Visual Studio and trying to figure out how to calculate the percentage of the boxes that are checked in a certain column.  I have a formula that is calculating a number but that number is always wrong.  I am not really sure what to do in this case.  You'd think Microsoft would have made this a little easier... surely I am not the only one that has ever wanted to do this?
Thanks!
=round((sum(cint(Fields!ows_Missing_Medical.Value)) / count(Fields!ows_Missing_Medical.Value)) *100) & "%"

Open in new window

0
Comment
Question by:wyldtwyst
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 6

Expert Comment

by:Andornagy
ID: 22781740
How did you feed the list to the Visual Studio? Where did you want to display this information. I suggest to use CAML query against the list.
0
 
LVL 1

Author Comment

by:wyldtwyst
ID: 22790499
I fed the list into Visual Studio with a long, convoluted process that Microsoft really should improve considering Sharepoint and Visual Studio are both Microsoft products.
Anyways, the better question for me to ask is probably this:
How do I count all of a field where the value is equal to a parameter?  for example:

count(Fields!ows_Month_submitted    -- and then I want to say WHERE Fields!ows_Month_submitted.Value = Parameters!Month.Value

It must be so easy, I just can't figure it out!
Thanks!
0
 
LVL 6

Expert Comment

by:Andornagy
ID: 22790833
It's looks like Youa are in the reportviewer control. I'm not really good in reportviewer. I didn't decide that You have problem with getting data from sharepoint or creating visual report from a dataset.
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
LVL 1

Author Comment

by:wyldtwyst
ID: 22790941
Yes sorry, perhaps I should have mentioned that!  I am building a report.  Sorry minor detail, eh? =)
0
 
LVL 6

Accepted Solution

by:
Andornagy earned 500 total points
ID: 22791216
If you can't deal with reportviewer try to precalculate data from query and pass to report via parameters.
Or you can take ideas from gotreportviewer site: http://www.gotreportviewer.com/
0
 
LVL 1

Author Comment

by:wyldtwyst
ID: 22795648
Hmmm.. I skimmed over the site but I don't see anything that would help... Sharepoint already has a report viewer web part so that's taken care of and I don't see any specifics on how to add conditions.  Thanks for the link though.


This has to be super-easy!  >.< It's driving me nuts!
0
 
LVL 1

Author Comment

by:wyldtwyst
ID: 22795654
I think I am going to re-ask my question and give you points for the effort =)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
In case you ever have to remove a faulty web part from a page , add the following to the end of the page url ?contents=1
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the adminiā€¦

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question