# Number

Create number variables when you need to pass a numeric or percentage value to a script or a filter.

### 1. Configuration <a href="#id-1.-configuration" id="id-1.-configuration"></a>

This section outlines configurations specific to number variables.

**1.1. Value:** Assign a default value for the number variable.&#x20;

**1.2. Value as percentage:** Enable this option if the variable will be used in calculations involving percentages E.g., calculate a percentage of profits.

**1.3. Show as slider:** A numeric slider will be displayed instead of a textbox.

**1.4. Min and Max:** Set the minimum and maximum values that can be set in the slider - the user will be able to select values that fall within the specified range.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FV3KR8XZbK19KXmgQFISQ%2Fimage.png?alt=media&#x26;token=fb3c1f87-ba13-4ef9-8bc0-162af7c1703d" alt=""><figcaption><p>Number variable configurations</p></figcaption></figure>

### 2. Examples <a href="#id-2.-examples" id="id-2.-examples"></a>

#### **2.1. Pass values dynamically to formulae**

**STEP 1:** Create a numeric variable with the configuration shown below.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2F7x5hyy6OaAwwPolxNKke%2Fimage.png?alt=media&#x26;token=7dc0a7be-8804-4544-a4b3-021374cfe954" alt=""><figcaption><p>Create a numeric slider variable</p></figcaption></figure>

**STEP 2:** Create a calculated measure and reference the technical name of the slider variable in the formula.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FBOA9BifyCf5qqmifPxAn%2Fimage.png?alt=media&#x26;token=364cb2f6-05f5-4160-bbc5-4dd73b61dc01" alt=""><figcaption><p>Create calculated measure </p></figcaption></figure>

**STEP 3:** Calibrate the slider to view the interest paid at varying interest rates.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2Ft37jMq2ZzvGSiA7jgQnJ%2FUntitled%20Project.gif?alt=media&#x26;token=c7b87c5f-3354-423a-a8bc-ddbf65e3ccba" alt=""><figcaption><p>Numeric slider in action</p></figcaption></figure>

#### **2.2. Dynamically filter data**&#x20;

**STEP 1:** Create a numeric variable with the configuration shown below.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FQBz21GUcozuFU15lWsCa%2Fimage.png?alt=media&#x26;token=be661591-93f5-46e3-89fe-50fdfc0b81e3" alt=""><figcaption><p>Create numeric variable</p></figcaption></figure>

**STEP 2:** Create an Inforiver filter that references the technical name of the numeric variable.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2Fwn7HnsERgF3M5awsXDAF%2Fimage.png?alt=media&#x26;token=d1b0ed9f-927c-46af-a0f7-4b434894a5ba" alt=""><figcaption><p>Create a Filter</p></figcaption></figure>

**STEP 3:** Enter values in the variable and notice how the data gets filtered on the fly without having to update the Inforiver filter each time.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2Fl6oMmmXAMhRNPHsPZ1e7%2FUntitled%20Project.gif?alt=media&#x26;token=9c6f8271-4ecd-4ed3-891a-e7e13c0cdf53" alt=""><figcaption><p>Filtering data with a numeric variable</p></figcaption></figure>
