Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I am new to Qlikview and am trying to pull data that has the earliest date for the record greater than a Date()-365. In other words I want all records where the first entry was in the past year.

I have tried numerous things such as (please don't laugh):

=sum(if(MinString({<[Actual GI Date]{">= DATE()-365"}>},Cost,Null())))  but it doesn't work.

any ideas???

3 Replies
maxgro
MVP
MVP

=Sum({<[Actual GI Date]={">=$(=date(Today()-365))"}>}  Cost)

Not applicable
Author

Unfortunately all that does is add the sum of Cost for anything with a Actual GI date of >= the last year.  I want to filter for only those whose EARLIEST record is in the past year

oknotsen
Master III
Master III

So from a certain customer, you want do some sum if that customer became a customer in the last 365 days. That customer can have multiple orders.

In that case I would add a flag field to your customer table during the load script.

Probably something like this:

left join(Customers)

Load CustomerID,

1 as CustomerLast365

Resident Orders

where [GI Date] > today()-365;

Use that CustomerLast365 field in your Set Analysis statement.

May you live in interesting times!