Lookup Column and aggregate functions

Lookup Column and aggregate functions

Hi,

I have 2 db´s.
1. Stores_db with information about stores (ie city, adress, storenumber) with a lookupfield "store id"
2. Sales_db

In the Sales_db i have two fields that I would like to have a formula just dividing one with the other. 

After that i would like to have a report where I can filter the sales data by parameters found in the Stores_db.

I have tried joining the tables but get no luck because of the aggregate formula. I have also tried using Query table but I dont understand how to join information from two different query tables

Please help =)