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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jamiemcc
Contributor III
Contributor III

If statement NULL

Hi Guys,

 

How do i Only include the last 28 days using the If statement. Date is a dimension,If Date is not within the last 28 days its null.

 

=If (DateId = {">=$(=Max(DateId)-28)"} ,Date,null())

 

Jamie

1 Reply
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hello,

Maybe below statement will help.

Expression : =If(Num(InvoiceDate) >=$(vMaxDate),Date(InvoiceDate),Null())

Variable for Max Date : =Max(InvoiceDate)-28 (Max Date in my data in 31-Dec-21).

AshutoshBhumkar_0-1637326885174.png

Thanks,
Ashutosh