Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
djbloiss
Contributor III
Contributor III

Sum last 5 days orders for any customer that purshased yesterday

I am trying to create an expression that will show all the cases a customer purchased ealier in the week if the purchased yesterday.  So if they bought from my company yesterday and monday then show mondays results.  If they purchased yesterday and noting earlier in the week, nothing.

sum({$<[Customer Adj]=p({<[Invoice Date Num]={$(=vxToday-1)}>}), [Invoice Date Num]={">=$(=vxToday-6))<=$(=vxToday-2)"}>} [Cases_Aggr])

it isn't showing any cases for customers that ordered earlier in the week.

13 Replies
swuehl
MVP
MVP

Shouldn't this part

<=$(=vxToday-20)


be like


<=$(=vxToday-2)


?

djbloiss
Contributor III
Contributor III
Author

That was a typo, so that isn't the issue. Have any other ideas?

sunny_talwar

Is this a typo too?

Sum({$<[Customer Adj]=p({<[Invoice Date Num]={$(=vxToday-1)}>}), [Invoice Date Num]={">=$(=vxToday-6))<=$(=vxToday-20)"}>} [Cases_Aggr})

djbloiss
Contributor III
Contributor III
Author

Yes, I just fixed it.

sunny_talwar

Would you be able to share a sample to look at this?

djbloiss
Contributor III
Contributor III
Author

I don't think it is possible there are ~50 tables in this qlikview document with gigs worth of data.  It would take hours to come up with a fake data document.  Unless you have any ideas how I could?

sunny_talwar

Two options

1) Mock up data related to just the problem

2) Preparing examples for Upload - Reduction and Data Scrambling

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Great, if you have found the answer.

Kindly close the thread by marking correct answer, if there are no answer then kindly share the solution which you found, so that others can understand it.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
sunny_talwar

Hey kaushik.solanki

I don't think OP have found a solution to his problem. I think he meant that he fixed the typo in the expression