Solved

Calculating Percentage of Checked Boxes on a Sharepoint List

Posted on 2008-10-22
7
621 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
  • 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now