2 Replies Latest reply on Sep 20, 2016 1:56 PM by Christopher Demundo

# Counting sales orders - table calc question

I have a sales situation where two part numbers can be sold in in quantities equaling 4.

So in this example, for each order number, the total quantity will equal 4 (potentially split across two part numbers)

Note in this example, order 1236 would not count and should be filtered out.

I created a filter (Is Sale?):

If sum(quantity) = 4 then 1 else 0

I can then use WINDOW_SUM to count up all the sales for each sales branch, but the way I'm doing it only works if order number is in the view.  Ideally, i'd like to just have the final output be:

East   1

North  2

South  2

West   1

Workbook attached, any help is appreciated!

• ###### 1. Re: Counting sales orders - table calc question

Christopher,

Create a calculated field as below and that should display the correct counts without the OrderNumber

{ FIXED [Order Number] : IIF((SUM([Quantity])>2),COUNTD([Order Number]),0)}

Good Luck !!

• ###### 2. Re: Counting sales orders - table calc question

Ah I didn't think of using LOD calcs.  This works very nicely, thank you!