Adding Filtered Variables to Metric Definitions
Filtered variables rely on attribute values to filter out data that only pertains to certain users. This is useful for restricting users' access to data for security reasons, but may also be helpful for streamlining large and complex projects so that users are not bogged down by data that does not relate to them. Filtered variables are set up in the Manage section and allow project administrators to determine which values within a given attribute should be available to particular users.
After a filtered variable has been established, you can apply it to a metric’s definition using the WHERE filtering keyword. The variable allows for dynamic (user-specific) metric computations in whatever report the metric is used.
In the following example, the variable Var_Industry has been defined such that the number of leads calculated will relate only to those industries that are relevant to each user.
SELECT #Leads WHERE Var_Industry