Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
djbloiss
Contributor III
Contributor III

Show Items that were purchased Yesterday but not the 30 days prior to that

I need to create a Qlikview report that will show all new items that customers purchased with new being defined as what they did not purchase in the 90 days prior.  Here is the formulas that I have tried:

=sum({$<[CustItemKey]=e({1<[Invoice Date Num]={'>=$(=vMax_SO_Closed_Date-30)<=$(=vMax_SO_Closed_Date-1)'} >} [CustItemKey]),

[Transaction Date Num]={"=$(=vMax_SO_Closed_Date)"} >} [Actual Quantity])

=sum({$<[CustItemKey]=p({1<[Invoice Date Num]-={'>=$(=vMax_SO_Closed_Date-30)<=$(=vMax_SO_Closed_Date-1)'} >} [CustItemKey]),

[Transaction Date Num]={"=$(=vMax_SO_Closed_Date)"} >} [Actual Quantity])

Within this CustItemKey refers to a customer item combination. vMax_SO_Closed_Date is today's date.

Right now these formulas are giving me all the sales that customers purchased for the items in the list even if it wasn't purchased yesterday.  What am I missing?

2 Replies
vishsaggi
Champion III
Champion III

Can you share some sample data or file to look into?

pradosh_thakur
Master II
Master II

=sum({$<[CustItemKey]-=p({1<[Invoice Date Num]={"<=$(=vMax_SO_Closed_Date) -30"} >} [CustItemKey]),

[Transaction Date Num]={"=$(=vMax_SO_Closed_Date)"} >} [Actual Quantity])

Learning never stops.