1

How to use the "lookup" function

The "lookup" function in Incorta can provide a powerful way to link together data that is otherwise unlinked.

Take, for example, the following fields from my "store" table.  This table has many fields that describe each of my stores; number of employees, square footage, first open date, etc.  In this case, I even have the "zip code" for most of my stores.  

 

This is all great, but what I'd really like to see is the "City" each store is located in.  As luck would have it, I have a table in Incorta that has the city and state for each zip code in the US.

 

Any table in Incorta can serve as a "lookup" table, provided it has a primary key field defined (Note: The following lookup function would not work unless "zippad" was defined as a key.) 

Returning to my insight, I can now add a "Formula Column" to my insight with the following lookup defined:

 

lookup(Retail.zipcodes_lookup.city,Retail.zipcodes_lookup.zippad,Retail.store.zip_code, 'City Not Found')

The Incorta lookup function follows the form 

lookup(<field from lookup table I want returned>,<primary key field on the lookup table>, <value that matches on PK field>, <optional default if no match found>)

After saving my formula with the lookup function, I can see the results immediately in the analyzer.

 

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like1 Follow
  • 1 Likes
  • 9 mths agoLast active
  • 452Views
  • 1 Following