jakeman
Active Member
- Joined
- Apr 29, 2008
- Messages
- 325
- Office Version
- 365
- Platform
- Windows
Hi All - I have a working query that allows me to filter out customers who have less than $60,000 in sales. However, I needed to add a Period field to the Query to see sales in each of the last four years. The only thing now is that using a simple filter in my query after adding the Period field, doesn't work for me anymore.
For example, CUSTXYZ has sales like this:
[TABLE="width: 500"]
<tbody>[TR]
[TD]customer
[/TD]
[TD]period
[/TD]
[TD]sales
[/TD]
[/TR]
[TR]
[TD]CUSTXYZ
[/TD]
[TD]2014
[/TD]
[TD]$62,000
[/TD]
[/TR]
[TR]
[TD]CUSTXYZ
[/TD]
[TD]2015
[/TD]
[TD]$86,000
[/TD]
[/TR]
[TR]
[TD]CUSTXYZ
[/TD]
[TD]2016
[/TD]
[TD]$92,000
[/TD]
[/TR]
[TR]
[TD]CUSTXYZ
[/TD]
[TD]2017
[/TD]
[TD]$72,000
[/TD]
[/TR]
[TR]
[TD]CUSTXYZ
[/TD]
[TD]2018
[/TD]
[TD]$52,000
[/TD]
[/TR]
</tbody>[/TABLE]
When I apply my Criteria to the Sales field (>=60000), sales for period 2018 gets eliminated. Is there a way that allows me to filter out records in my query where the combined sales for a customer over a 4 year period are less than $60,000?
For example, CUSTXYZ has sales like this:
[TABLE="width: 500"]
<tbody>[TR]
[TD]customer
[/TD]
[TD]period
[/TD]
[TD]sales
[/TD]
[/TR]
[TR]
[TD]CUSTXYZ
[/TD]
[TD]2014
[/TD]
[TD]$62,000
[/TD]
[/TR]
[TR]
[TD]CUSTXYZ
[/TD]
[TD]2015
[/TD]
[TD]$86,000
[/TD]
[/TR]
[TR]
[TD]CUSTXYZ
[/TD]
[TD]2016
[/TD]
[TD]$92,000
[/TD]
[/TR]
[TR]
[TD]CUSTXYZ
[/TD]
[TD]2017
[/TD]
[TD]$72,000
[/TD]
[/TR]
[TR]
[TD]CUSTXYZ
[/TD]
[TD]2018
[/TD]
[TD]$52,000
[/TD]
[/TR]
</tbody>[/TABLE]
When I apply my Criteria to the Sales field (>=60000), sales for period 2018 gets eliminated. Is there a way that allows me to filter out records in my query where the combined sales for a customer over a 4 year period are less than $60,000?