0

Sum of Sales Line and Historical Sales Line data

Hello,

I am attempting to create a report that sums the sales qty per month per salesperson.

I have an rolling 18 month date window across the top columns (Jan, Feb, March, etc.)

Then I have rows of salespeople.

I need to find the sum of the sales qty per month for each salesperson.

The problem i have is, I need current data for items that have not shipped, which I can take from the sales line table, and historical data for the items that have shipped, which I can get from the sales line history table.

My first thought is something like:

$G15 = Salesperson Code
I$10 = Date Filter

=NL("Sum","Sales Line","Qty. to Ship","PfsSalesperson Code",$G15,"Link=","Sales Header","No.","=Document No.","Order Date",I$10)+NL("Sum","PfsSales Line History","PfsOrder Quantity","PfsSalesperson Code",$G15,"Link=","PfsSales Header History","No.","=Document No.","Order Date",I$10)
Problem here is that it takes forever. Does anyone have any suggestion for a more efficient way to get the result I am looking for?

Thanks,

Tyler

2 comments

Please sign in to leave a comment.