Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
greend21
Contributor II

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

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

How do you define vMaxRptDate?

greend21
Contributor II

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

Max(ReportDate)

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

Try this

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

greend21
Contributor II

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

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.