Get the MAX value from columns

…this post was published on 2015 December 3.

The issue is: how to calculate the  MAX for 4 adte columns and also compare with another << Today>> value column
The complete post is this one

For this, let me create a new testing list, with 4 columns, all as Date-only type column: date1, date2, date3 and date4. As the fifth column, a named <<today>> with default value=Today

To calculate the needed value, we need 2 more columns as calculated columns – calc1 and calc2  –  because Sharepoint doesn’t permit more than 7 IF levels
In calc1 first, we will compare
– date1 with today value and based on this result, will transmit deeper date1 value or the standard date :1/1/1901
IF(date1<today,date1,DATE(1901,1,1))
 – date2 with today value and based on this result, will transmit deeper date2 value or the standard date :1/1/1901
IF(date2<today,date2,DATE(1901,1,1))
and next we wil compare these 2 results and will put then needed value in calc1 column

So for calc1 column, the formula it is:
=IF(IF(date2<today,date2,DATE(1901,1,1))<IF(date1<today,date1,DATE(1901,1,1)),IF(date1<today,date1,DATE(1901,1,1)),IF(date2<today,date2,DATE(1901,1,1)))

Similar, for columns date3 and date4 –  for calc2 column, the formula it is
=IF(IF(date4<today,date4,DATE(1901,1,1))<IF(date3<today,date3,DATE(1901,1,1)),IF(date3<today,date3,DATE(1901,1,1)),IF(date4<today,date4,DATE(1901,1,1)))

Finally we will compare calc1 and calc2 and will fill calc_final with the specific value


Using these calculated columns, my list looks like

This entry was posted in CalculatedColumn, Sharepoint, Sharepoint 2013. Bookmark the permalink.