Solved

Calculating Percentage of Checked Boxes on a Sharepoint List

Posted on 2008-10-22
7
616 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Author Comment

by:wyldtwyst
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
I think I am going to re-ask my question and give you points for the effort =)
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

762 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

8 Experts available now in Live!

Get 1:1 Help Now