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
Like2 Follow
  • 2 yrs agoLast active
  • 803Views
  • 2 Following

Product Announcement

A new community experience is coming! If you would like to have beta access to provide feedback, please contact us at community@incorta.com.