Metric App Filter
Metric App Filter: Instruction Manual
Last updated
Metric App Filter: Instruction Manual
Last updated
Using the App Filter in Metric:
Create a Metric Filter
In your Metric, create a new filter
In the "Apply On" section, enable the "App Filter" option
Passing Filter Values Method 1: Passing from Component
Use the parameter "metric-filter-options"
to pass values directly from a component to the metric filter.
Configuration changes based on the Filter Type and the Data Type.
Single-Select Filter:
For string-based filters, pass just the value:
2. Multi-Select Filter:
For string-based filters, pass an array of values:
Method 2: Passing from Guest Token
You can link a guest token here to pass the filter values dynamically.
Refer the below document to generate a guest token.
Make sure the options and values match the data type of the filter for successful integration.
Filters with a large number of options (e.g., over 500), manually passing all values becomes inefficient. With SQL integration, you can dynamically fetch options from your database, simplifying the process.
The SQL query specified under the "sql"
key dynamically fetches the latest values from the specified database table.
Key Benefits:
Dynamic Updates: The SQL query retrieves only the latest relevant options from your database.
Example: SELECT "name" FROM "public"."countries" WHERE isEnabled=true
fetches active country names.
Efficiency: Eliminates the need to manually manage large datasets in the configuration.
Flexibility: The columnName
specifies the field in the query result to use as filter values.
Scalability: Handles thousands of options seamlessly, reducing payload size and improving performance.
This approach is ideal for keeping filters updated with minimal effort, ensuring they remain efficient and user-friendly.
Refer the below "Options" document for further queries.