Forum Discussion

AdityaBhandar's avatar
Qrew Member
3 years ago

Derive the field value from another table

Can you please help me write the QB formula for below region derivation?

Say there are two tables 
1. Sales table:
Customer  Region Sales
1001            NA     $100
1002           SA      $200
1003           EU      $300
1004           AS      $400
How can derive Region from customer table. if it is Excel, I would have written as If(VLOOKUP(Customer,Customertable(Customer:Country),2,false)="US", "NA"
If(VLOOKUP(Customer,Customertable(Customer:Country),2,false)="MX", "SA"

2. Customer table
Customer Country 
1001            US         
1002           BR         
1003           FR         
1004           IN


1 Reply

  • Normally your application would be set up with a relationship where one customer has many customer sales.  Simply look up the value of the country code from the customer table down to the sales table.

    Mark Shnier (YQC)