Solved

Help with calculated field in sharepoint

Posted on 2011-03-16
6
436 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
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.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Last week I faced a strange issue recently, i have deployed SharePoint 2003 servers for one project and one of the requirements was to open SharePoint site from same server. when i was trying to open site from the same server i was getting authentic…
I recently came across an issue with a MOSS 2007 deployment where access into some sub-sites were denied, even for the MOSS farm administrators. A bit of background to the setup of this MOSS farm; this was a three server setup, consisting of a fr…
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.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

786 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