> For the complete documentation index, see [llms.txt](https://docs.inforiver.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inforiver.com/formula-syntax/miscellaneous-functions/lookup.md).

# LOOKUP

The LOOKUP function can look up values from an Infobridge query and load them inside an Inforiver visual. It can fetch measure values directly from Infobridge without creating an integration and importing measures/rows into your report.  

### Syntax

```javascript
LOOKUP(queryIdentifier:string,measure:string,rows:[string],columns:[string])
//fetches data from the specified query and measure
```

### Arguments

queryIdentifier - It is used to identify the query from which data has to be fetched. String Argument (Required).

<figure><img src="/files/mubvQvFXAggT008mqCj0" alt=""><figcaption><p>Copy the query GUID from Infobridge</p></figcaption></figure>

key- It specifies the key whose value is to be extracted. String Argument (Required).

rows - Specify specific row dimension category values or use dimension names. Array Argument (Optional).

columns- Specify specific column dimension category values or use dimension names. Array Argument (Optional).

### Examples

**Example 1:** Refer to a specific row and column and fetch the measure value from Infobridge.

The bridge contains the quarterly rebate rates for a set of products.

<figure><img src="/files/bTVW6URQUaGvMTOBCxfW" alt=""><figcaption><p>Bridge to lookup measure values</p></figcaption></figure>

In the target visual, we can pull the rebate rate for the "Velo" product for Q4 using the LOOKUP function as shown.

<figure><img src="/files/lhvlVyF1QtGOM9RcJQyT" alt=""><figcaption><p>LOOKUP function for specific row and column dimension categories</p></figcaption></figure>

**Example 2:** Fetch values when the row and column dimensions are the same in the bridge and the target visual.

The bridge contains the country-wise rebate rates for a set of products.

<figure><img src="/files/0FHth1PMFl4cBNcMIr2P" alt=""><figcaption><p>Bridge to lookup measure values</p></figcaption></figure>

In the target visual, we can pull the rebate rate without specifying the rows and columns. They are automatically mapped within Inforiver.

<figure><img src="/files/xmBc8N2FU74JP9NuQvxZ" alt=""><figcaption><p>LOOKUP function when the row and column dimensions match in the bridge and target visual</p></figcaption></figure>

You can use the ROW/COLUMN identifiers when the row and column dimensions in the bridge are identical to the target visual.

<figure><img src="/files/5FOgR5h7uIfsI25pAIBy" alt=""><figcaption><p>Using the ROW and COLUMN identifiers</p></figcaption></figure>

**Example 3:** Fetch values when the row and column dimensions in the bridge and the target visual are not identical.

The bridge contains a flat discount rate for product categories.

<figure><img src="/files/cHK1wf25fkCB2MiyBhj6" alt=""><figcaption><p>Bridge to lookup measure values</p></figcaption></figure>

In the target visual, we can pull the discount rate although the bridge does not contain column dimensions and the row dimension hierarchy is different.

<figure><img src="/files/7dPe63FzA03LDoGNV6zD" alt=""><figcaption><p>Lookup when dimensions do not match</p></figcaption></figure>

You can also fetch values from a bridge and map them to a visual column.

<figure><img src="/files/F4WXqI49RkHCQt0g2rja" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.inforiver.com/formula-syntax/miscellaneous-functions/lookup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
