While I was away, Hui did a splendid job of starting a new series called Formula Forensics. The idea is to break down formulas for difficult real-world problems so that we can understand them better.
In that spirit, I am giving you an interesting and tough formula homework.
Situation:
Imagine you work for Large Fries Inc. as a sales person. You sell fries, chips, curls and other coronary clog causing consumables. It is not a pleasant job, but you do it nevertheless. The economy is not good and you don’t want the paycheck to vanish!
The Large Fries Inc., much like any company large, has some crazy policies. One such thing is their payment policy for sales persons. It has 2 important rules.
- You must earn at least $200 before they pay you.
- There should be a gap of at least 7 days between successive payments.
Shown below is your sales data since October 1st. First column is date, second is your commission earned.

Your Homework:
Your mission, if you choose to accept, is not really dangerous or explosive. Nevertheless, it is fun and challenging.
Write a formula in third column such that it show the amount of commission to be paid subject to the 2 conditions above. You can use a helper column if you want.
The downloadable file contains correct answers for you to verify your solution.
Download Workbook with Data
Click here to download the homework problem workbook. You can see the correct answers too (no formulas, just answer).
Go ahead and Solve
Go ahead and solve this and post your answers. I am really curious to know how you would solve this. Please share your explanations in the comments.















3 Responses to “Filter one table if the value is in another table (Formula Trick)”
What about the opposite? I want a list of products without sales or customers with no orders. So I would exclude the ones that are on the other table.
Good question. You can check for the =0 as countifs result. for example,
=FILTER(orders, COUNTIFS(products, orders[Product])=0)
should work in this case.
PS: I have added this example to the article now.
Hi there!
Could i check if there was a way to return certain fields of the table only?
so based off your example above, i would like to continue to use the 'Products" table as a way to filter out items from my "Orders" table, but only want to show maybe only the "Product" and "Order Value" fields, rather than all 5 fields (sales person, customer, product, date, order value).