cancel
Showing results for 
Search instead for 
Did you mean: 

How to find maximum date across 3 columns

former_member277624
Participant
0 Kudos

hi

I have 3 columns in a report. Date1, date2 and date3. I need a variable that will return the max date of any of these 3 columns. In other words, I should have a new column that's contains one date. Which is the max date of any of the 3 date columns.

Can anyone help?

Thanks

Will

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member198519
Active Contributor
0 Kudos

Try this:

=if([Date1]>[Date2] and [Date1]>[Date3]) then [Date1]

elseif([Date2]>[Date3]) then [Date2]

elseif([Date3]>[Date1]) then [Date3]

former_member277624
Participant
0 Kudos

Hi Kuldeep

Many thanks for your help.

I should have said one of the Dates is a Detailed Object which i created from a Variable - using your solution I get an error message. Is there something different that I should be doing due to having this detailed object?

Thanks

Will