How to: Build a complex calculated formula for a SharePoint list

You reference fields/columns by their display names in square brackets, eg: [Deliverable Status]. You concatenate these with the “CONCATENATE” keyword. You need to make sure that there is absolutely no blank space in your formula.You also have IF statements that work like so: IF(condition,value_if_condition_is_true,value_if_condition_is_false).

The following works in a field called “Deliverable Type Display”:

=IF([Deliverable Type]=”Deliverable”,”[DL] -“, IF([Deliverable Type]=”Milestone”,”[ML] -“, IF([Deliverable Type]=”Ad-Hoc Task”,”[AT] -“, ” “)))

The following works for a field called “Deliverable Display”:

=CONCATENATE(IF([Deliverable Type]=”Deliverable”,”[DL] – “,IF([Deliverable Type]=”Milestone”,”[ML] – “,IF([Deliverable Type]=”Ad-Hoc Task”,”[AT] – “,”[No Type]”))),[Deliverable],” – “,[Deliverable Status],” – “,DAY([Due]),”/”,MONTH([Due]),”/”,YEAR([Due]))

YOU HAVE TO REMOVE ALL THE BLANKS FROM THE FORMULA TO WORK. OTHERWISE, THE RESULT ALWAYS IS “2”.
For example, this:

=CONCATENATE(IF([Deliverable Type]=”Deliverable”,”[DL] – “,IF([Deliverable Type]=”Milestone”,”[ML] – “,IF([Deliverable Type]=”Ad-Hoc Task”,”[AT] – “,”[No Type]”))),[Deliverable],” – “,[Deliverable Status],” – “,DAY([Due]),”/”,MONTH([Due]),”/”,YEAR([Due]))
works, but this:
=CONCATENATE(IF([Deliverable Type]=”Deliverable”,”[DL] – “,IF([Deliverable Type]=”Milestone”,”[ML] – “,IF([Deliverable Type]=”Ad-Hoc Task”,”[AT] – “,”[No Type]”))), [Deliverable],” – “,[Deliverable Status],” – “,DAY([Due]),”/”,MONTH([Due]),”/”,YEAR([Due]))

does not work because there is a blank space preceding the [Deliverable]. (it’s in the Ad-Hoc Task comparison, after the comma: , [Deliverable],)

MGR: the Intelogist

About MGR: the Intelogist

SharePoint Server developer, turned Sitefinity developer, turned Angular developer, turned SharePoint Online consultant, turned Unily consultant, turned O365 consultant... Never a dull moment!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

This site uses Akismet to reduce spam. Learn how your comment data is processed.