Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
greend21
Creator III
Creator III

IF(Datefield = Max(OtherDateField), ...

My If statement is below. I've tried a few different thins that don't seem to work. It's not recognizing the criteria for 'US Entry Date' and is lumping these into the 'Other' category.

=IF(DWHUSEntryDt= '$(=$(vMaxRptDate))','US Entry Date',

IF(DWHAllocStCd='U' AND DWHAllocNum <>0,'Backed Out Allocation',

    'Other'))

4 Replies
sunny_talwar

How do you define vMaxRptDate?

greend21
Creator III
Creator III
Author

Max(ReportDate)

sunny_talwar

Try this

=If(DWHUSEntryDt = Max(TOTAL  ReportDate), 'US Entry Date', If(DWHAllocStCd='U' and DWHAllocNum <> 0, 'Backed Out Allocation',  'Other'))

greend21
Creator III
Creator III
Author

This still didn't work and as of right now I only have one ReportDate. I realized what I want to do won't work though because I'm going to need to flag the information in the load script. I don't want anything that's not =Max(ReportDate) to be bucketed as other in the future.