1,804 articles and 14,828 comments as of Tuesday, May 10th, 2011

EndUserSharePoint has combined resources with NothingButSharePoint.com. You can now find End User (Mark Miller), Developer (Jeremy Thake) and IT Pro SharePoint content all in one place!

This site is a historical archive and is no longer being updated. Please update your favorites, bookmarks and RSS feeds.

NothingButSharePoint.com
Friday, February 27, 2009

Taming the Elusive “Calculated Column” – Logic – Part 5

The Final List

In our list, we need to add in our additional two “Question” columns so create two more “Choice” columns (in the same fashion as the existing “Hungry” and “Thirsty” columns) called “Tired” and “Sick”.

Modify the “Column Ordering” to display the items on the “New Item” form in the correct order:


Taming The Elusive Part 5

Modify your view to display the fields in the same order:


Taming The Elusive Part 5

Create several items on the list to cover the range of all possible answers (Hint – use the “Truth Table” as a reference when creating the items):


Taming The Elusive Part 5

Based on our “Truth Table”, we can see that our logic does indeed catch each and every possible result (with the addition of displaying a result even if fields were skipped).

Conclusion

So what do we do with all of this?  What I’ve shown are obviously just simple examples using questions that aren’t exactly “Business Data”, but hopefully they will still serve as a foundation for how to begin building out formulas for your own needs.

Using the method of building out a “Truth Table” then a “Flowchart” for each and every nested formula may not always be the best approach for you given the time it takes to build them out, but as the complexity of your formulas increase, you might find that having them can decrease the “headache-time” of debugging and troubleshooting when your logic goes awry.

Hints:

  • Use Excel to quickly build out a “Truth Table” when needed (since it’s nothing more than columns and rows anyway)
  • And Visio (or a piece of scratch paper in a pinch) for quickly building hierarchical flowcharts (OpenOffice.org is another great option if you don’t have the budget for MS Office).

Unfortunately, I wasn’t able to get into the alternate use of the “AND” and “OR” functions for testing multiple conditions in an “IF” formula (that was my original plan), but that is next on my list so I’ll make sure and cover those in the next article.

Till next time…

- Dessie

Dessie LunsfordDessie Lunsford
Points-of-Sharing

View all entries in this series: Dessie Lunsford-Logic Formulas»
Entries in this series:
  1. Taming the Elusive "Calculated Column"
  2. EndUserSharePoint.com: Taming the Elusive "Calculated Column" - Customizing a Task List
  3. EndUserSharePoint.com: Taming the Elusive “Calculated Column” - Customizing a Task List (Part II)
  4. EndUserSharePoint.com: Taming the Elusive “Calculated Column” - Customizing a Task List (Part III)
  5. EndUserSharePoint.com: Taming the Elusive “Calculated Column” - Customizing a Task List (Part IV)
  6. EndUserSharePoint.com: Taming the Elusive “Calculated Column” - Text and Data
  7. EndUserSharePoint.com: Taming the Elusive "Calculated Column" - Customizing a Contacts List (Part I)
  8. EndUserSharePoint.com: Taming the Elusive "Calculated Column" - Customizing a Contacts List (Part II-I)
  9. EndUserSharePoint.com: Taming the Elusive “Calculated Column” - Customizing a Contacts List (Part II-II)
  10. EndUserSharePoint.com: Taming the Elusive “Calculated Column” - Customizing a Contacts List (Part II-III)
  11. EndUserSharePoint.com: Taming the Elusive “Calculated Column” – Text and Data (Part III)
  12. EndUserSharePoint.com: Taming the Elusive “Calculated Column” – Text and Data (Part IV)
  13. EndUserSharePoint.com: Taming the Elusive “Calculated Column” – Text and Data (Part V)
  14. EndUserSharePoint.com: Taming the Elusive “Calculated Column” – Text and Data (Part VI)
  15. Taming the Elusive “Calculated Column” – Lookup and Reference
  16. Taming the Elusive “Calculated Column” - Logic
  17. Taming the Elusive “Calculated Column” - Logic - Part 1
  18. Taming the Elusive “Calculated Column” - Logic - Part 2
  19. Taming the Elusive “Calculated Column” - Logic - Part 3
  20. Taming the Elusive “Calculated Column” - Logic - Part 4
  21. Taming the Elusive “Calculated Column” - Logic - Part 5
  22. Taming the Elusive “Calculated Column” - Logic - Part 7
  23. Taming the Elusive “Calculated Column” - Logic - Part 6
  24. Taming the Elusive “Calculated Column” - Logic - Part 8
  25. Taming the Elusive “Calculated Column” - Logic - Part 9
  26. Taming the Elusive “Calculated Column” - Logic - Part 10
  27. Taming the Elusive “Calculated Column” - Date and Time - Part 1
  28. Taming the Elusive “Calculated Column” - Date and Time - Part 2
  29. Taming the Elusive “Calculated Column” - Date and Time - Part 3
  30. Taming the Elusive “Calculated Column” - Date and Time - Part 4
  31. Taming the Elusive “Calculated Column” - Referencing Multiple Lines of Text Column
  32. Taming the Elusive “Calculated Column” – Date and Time – Part 5
  33. Taming the Elusive “Calculated Column” – Date and Time – Part 6
  34. Taming the Elusive “Calculated Column” – Date and Time – Part 7
  35. Taming the Elusive "Calculated Column" - Referencing a Multiple Lines of Text Column With Append Text: Part 1
  36. Taming the Elusive "Calculated Column" - Referencing a Multiple Lines of Text Column With Append Text: Part 2
  37. Taming the Elusive "Calculated Column" - Referencing a Multiple Lines of Text Column With Append Text: Part 3
 

Please Join the Discussion

6 Responses to “Taming the Elusive “Calculated Column” – Logic – Part 5”
  1. Dhanyatha says:

    Hi,
    If a column say column 1 is equal to a particular value then I need to use Veiw1 otherwise need to use View2.
    Is is possible to use views in a calulated column?

  2. Tom Hockman says:

    While the formulas for calculating values within a list item make sense from a flat database standpoint, can SharePoint leverage the values from other rows in a list, or a site column cumulative value, to calculate on a variable? The challenge I’m facing is to update a remaining budget amount on successive items in a list. In other words, I need to reference the remaining budget as of the previous list item and calculate based on a new expense in the current line. Can SharePoint point to a value in an other row the way Excel can target a cell address?

Trackbacks

Check out what others are saying about this post...
  1. [...] Taming the Elusive “Calculated Column” – Logic – Part 5 [...]

  2. [...] Taming the Elusive “Calculated Column” – Logic – Part 5 [...]

  3. [...] Taming the Elusive “Calculated Column” – Logic – Part 5 [...]




Notify me of comments to this article:


Speak and you will be heard.

We check comments hourly.
If you want a pic to show with your comment, go get a gravatar!