Forum Discussion
Brian Knutson
May 10, 2017Brass Contributor
SharePoint Calculated List Column
Under a standard custom list, can I use the calculated field to assign values to a choice field that has words not numbers? We want to determine cost for printing in black and white vs color. I have a...
- May 11, 2017You can use this query written for you.
=IF([Pagetype]="Black & White",([page no]*11),IF([Pagetype]]="Color",[page no]*19))
Chris Gullicksen
May 10, 2017Iron Contributor
Hello,
Calculated columns in a basic list will provide a result of some sort that is displayed in your view based on the calculations you do with existing data. So if you want to do math then it would be best to capture numbers in your other columns first.
- Example:
- Black (Number Column)
- Color (Number Column)
- Calc (Calculated Column)
- Formula: =[Black]*[Color]
so in your view using your example numbers you would see something like this:
| Black | Color | Calc |
| 11 | 19 | 209 |
Also remember you can add counters to the view (See modify view > totals section) give you that information if need be.
Otherwise you cant use a calculated field to change your Choice Field options. Conditional logic can be developed in InfoPath.
- Brian KnutsonMay 10, 2017Brass ContributorMaybe I can explain it a little better. I have a list already created. I have a field with a dropdown for ink color that has "Black & White" and "Color" as an option. I also have a single field called paper quantity. Black & White costs 11 cents a side and color costs 19 cents a side. I was hoping I could have Black & White represent .11 and Color represent .19 and then times it by the quantity category and have it output in the form as a total estimated cost. Does that sound like it would work? Let me know what you think and thanks for responding!
- John Aage AndersenMay 11, 2017Iron ContributorHi Brian
Assuming that by dropdown field, you mean that you are using a Choice column and that it has the two options "Black & White", and "Color".
If that is so, you calculated column, should be able to have a formular like:
=[Quantity] * IF([Ink color] EQ "Black & White", 0.11, 0.19)
Above is not the real code :) just an example
Enjoy, John