---
schema_version: "1"
id: fe6d30603b756fb936ca1b87fee48a99a400b4c7f019ef6c2b1181ee30beec03
title: Add the Input Widget to Formula Queries
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_explorer_dynamic_input_query.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_explorer_dynamic_input_query.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 2219882677b65a91b99e9a82c549d2488d88f755474208aba3456c4b3dde35ab
description: Retrieving values from the input widget to use in a formula can be done through the UI. You can add the input widget as a column in a query or with SAQL. The input widget works as a data source by collecting user inputs for use in other parts of the dashboard.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# Add the Input Widget to Formula Queries

Retrieving values from the input widget to use in a formula can be done through the UI. You can add the input widget as a column in a query or with SAQL. The input widget works as a data source by collecting user inputs for use in other parts of the dashboard.

Steps in this section show you how to add the input widget to a calculation through the UI. To learn more using the input widget with interactions, see [Create Interactions with Clicks](https://help.salesforce.com/s/articleView?id=analytics.bi_dashboard_create_interactions_bindings.htm&release=264.0.0&type=5 "Interactions, previously called bindings, are the most powerful way to specify relationships between different queries on your dashboard. Creating the right syntax for an interaction can be complex. With the Advanced Interaction Editor, create, edit, and preview your interactions with clicks.")

- **[Add the Input Widget to a Formula Query](https://help.salesforce.com/s/articleView?id=analytics.bi_explorer_dynamic_input_query.htm&release=264.0.0&type=5)**  
    Use the input widget to build a formula in a new or existing query.
- **[Add the Input Widget to a SAQL Query](https://help.salesforce.com/s/articleView?id=analytics.bi_explorer_dynamic_input_query.htm&release=264.0.0&type=5)**  
    Add the input widget to a new or existing query using SAQL.

## Add the Input Widget to a Formula Query

Use the input widget to build a formula in a new or existing query.

1. Add an input widget to your dashboard.
    
    ![Adding an input widget to the dashboard.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboard_input_widgets_query_ui.png)
2. Create a query or select an existing query for building your formula.
    
    ![Adding an input widget to the dashboard.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboard_input_widgets_query_ui_2.png)
3. Edit the query you’re using to build your formula result.
4. Add a column to the query and select **Input**.
5. Search and select an input query.
    
    ![Adding the input query to an existing query.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboard_input_widgets_query_ui_3.png)
6. Add another column and select **Formula**.
7. Use the formula editor to create a calculation using values from the input query.
    
    ![Using the input query in a formula.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboard_input_widgets_query_ui_4.png)

## Add the Input Widget to a SAQL Query

Add the input widget to a new or existing query using SAQL.

1. Add an input widget to your dashboard.
2. Create a query or select an existing query for building your formula.
3. Edit the query you’re using to build your formula, and click **Query Mode**.
4. Position your cursor in the SAQL code where to add values from the input query, and click the **Add Input** link.
    
    ![Adding an input widget to a SAQL query](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_explorer_dynamic_input_query_saql.png)