Solved

Help with calculated field in sharepoint

Posted on 2011-03-16
6
416 Views
Last Modified: 2012-05-11
I have a sharepoint list I am using to help rate things on a dashboard view.  I have 20 fields that get a rating of either Blue, Green, Yellow, Red or Grey (Grey is not applicable).  These fields are DB_RTG001 - DB_RTG020.
 
I want to have a field called RTG that is a calculate field which is the average of all. And then about field called COLOR which is the overall rating color.

I was thing that the Colors would have values:
Blue - 5
Green - 4
Yellow - 3
Red - 1
Grey - 0?

How would I set up the calculated field and then the color field?
0
Comment
Question by:Matt Pinkston
  • 3
  • 2
6 Comments
 
LVL 14

Expert Comment

by:GeorgeGergues
ID: 35149968
You can add the calculated field to be
([DB_RTG001]+[DB_RTG002]+......+[DB_RTG020] )/20

Make sure you use 0 decimal points as your number value.

Best of luck
0
 

Author Comment

by:Matt Pinkston
ID: 35150056
but the DB_RTG### fields equal either (Blue, Green, Yellow, Red or Grey)
0
 
LVL 14

Expert Comment

by:GeorgeGergues
ID: 35150364
You might want to investigate some Javascript in content query webpart

first you might want to contact all the colors in a single string . then parse and count the encounter of "Blue" , Green ...

Also you can get the values in colors.


This article should give you some ideas

http://www.orbitone.com/en/blog/archive/2010/10/25/calendar-colour-coding-in-sharepoint.aspx

I am sorry I cannot go beyond that point.

Best of luck
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

 

Author Comment

by:Matt Pinkston
ID: 35153059
looking for a way using IF in the calc field to do the addition like if DB_rt1001 = "blue" + 4, if DB_rt001 = "green" +3 so on...  
0
 

Author Comment

by:Matt Pinkston
ID: 35181075
still looking for a solution, I am not proficient with if statements in a calculated SP field but pretty sure this can be done.
0
 
LVL 6

Accepted Solution

by:
Rafael I earned 500 total points
ID: 35225654
try this:

put the numbers in front of the choices, as if you're numbering them for the user" "0 - Grey; 1 - Red; 2 - Yellow; etc"

then in the column that you're using to average, use this to find each value: VALUE(LEFT(Color,1))

Left(ColumnName,1) will return the 1st character of the field and Value should return the numerical value of that character

If not, mix and match from these sites and try thinking in Excel:
http://office.microsoft.com/en-us/windows-sharepoint-services-help/CH001171117.aspx
http://office.microsoft.com/en-us/windows-sharepoint-services-help/examples-of-common-formulas-HA001160947.aspx?pid=CH011711541033
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
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…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

747 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

13 Experts available now in Live!

Get 1:1 Help Now