What is your datasource? SQL? Excel? something else?
Using a MySQL database.
Ok, I suggest you join the tables in SQL before pulling in to Tableau. First I would build a view on Table2 to bring in a DateTo field - it'll make the join with Table1 more straightforward. For example:
B 10% 10-Apr-16 1-May-16 B 20% 1-May-16 10-May-16 B 30% 10-May-16
Your SQL statement bringing the data into Tableau will be along the lines of:
SELECT t2.*, t1.Margin
FROM ViewOfTable2 t2
JOIN TABLE1 t1 ON t2.Sellet = t1.Seller AND T2.OrderDate >= t1.DateFrom and t2. OrderDate < ISNULL(t1.DateTo,NOW())
Thanks a lot Andrew. Adding the DateTo along with the formula given works like a charm.