Solved

Calculating Percentage of Checked Boxes on a Sharepoint List

Posted on 2008-10-22
7
626 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

789 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