Filters and Inputs
Creating interactive reports for your stakeholders.
Creating filters & inputs
Once you’ve built some insights that you’d like to share, the next step is to make these interactive so your stakeholders can explore the insights on their own.
To do this, we’ll need to create filters and inputs.
You can create the following types of filters and inputs:
- Date and date ranges
- Dropdown lists
- Numbers
- Boolean (True/False)
- Text
Filter and input types and variables
Fabi.ai offers a wide variety of configuration options so that you can create virtually any type of report or data app.
- Dates
- You can can create a single date picker or a date range
- Dropdown lists
- You can choose if you want the values in the list to be manually created or dynamically generated from a list of distinct values in a table (DataFrame) filtered_customers
- You can choose if you want to let the user select a single value at a time or multiple values. Note that which one you select requires a different treatment in SQL and Python. Single values are treated as strings whereas multi-select values are treated as lists
- Numbers
- You can create a single number input or a range selector
- Boolean
- Text
Using a dynamic list in SQL.
Creating filters and inputs in SQL
To add a filter or input to a SQL query, find the variable that you want to parameterize, and replace it with {{your_variable_name}}
.
For example:
Next, above the SQL cell, select Insert a new cell then Filters & Inputs. Select the type and enter the required information. Once you’re done, press Submit.
Step 1: Create a variable
Step 2: Create a filter or input
Step 3: Configure the filter or input
Note: You can also insert these parameters in text cells
Creating filters and inputs in Python
You can create filters and inputs in Python cells the exact same way that you would for SQL, except that you can’t just use the variable directly, without the {{}}
.
For example: