Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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'))

Labels (1)
4 Replies
sunny_talwar
MVP
MVP

How do you define vMaxRptDate?

greend21
Creator III
Creator III
Author

Max(ReportDate)

sunny_talwar
MVP
MVP

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.