Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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