?
Solved

Help with calculated field in sharepoint

Posted on 2011-03-16
6
Medium Priority
?
463 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 

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 2000 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

752 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