Solved

Help with calculated field in sharepoint

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

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

Suggested Solutions

Title # Comments Views Activity
Dynamic content on SharePoint 2013 13 77
sharepoint online 3 49
Sharepoint workflow on list 6 38
JSOM: The collection has not been initialized. 5 48
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…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

863 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

20 Experts available now in Live!

Get 1:1 Help Now