Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
MartinMCS
Contributor
Contributor

Rolling last 3 moths

Hi all

i have a field "Num (Entry) as Entry" with dates of from 44562(01/01/2022) to 44924(29/12/2022). But here i need a new column of "[Rolling Last 3 Months]", in this column result will be show from 44924 (29/12/2022) to 44833 (29/09/2022). for this i have tried this way......

Tmp:
Load *,
If (num(floor (Entry))=Num (AddMonths (today (),-3)),
1,
0) as [Rolling Last 3 Months]

Resident Table;

Drop Table Table;

But here while i select '1' from Rolling last 3 months field, the rusult shown only 44833(29/09/2022)

The expected result is from 44924(29/12/2022) to 44833(29/09/2022)

Can you guys suggest me where I was wrong here.

Thanks in advance.

Labels (3)
1 Solution

Accepted Solutions
Or
MVP
MVP

Shouldn't that be:

If (num(floor (Entry))>=Num (AddMonths (today (),-3)),

?

View solution in original post

1 Reply
Or
MVP
MVP

Shouldn't that be:

If (num(floor (Entry))>=Num (AddMonths (today (),-3)),

?