• /
  • EnglishEspañol日本語한국어Português
  • Inicia sesiónComenzar ahora

Filter dashboards faster with template variable toggle

September 10, 2024

Template variables can now be included or excluded from your dashboard widgets

  • Learn more

Template variables allow you to dynamically filter charts and widgets in your custom dashboards, making dashboards more adaptable for various use cases. Now, you have more flexibility when configuring variables with the Include variable toggle. It allows you to exclude variables that have been added to one or more widgets in a dashboard. You do not need to modify any queries.

How it works

Previously, when you used variables in widgets, your queries were limited to the values defined for that variable, which could be limiting in certain scenarios, such as missing values. This could result in incomplete data being shown in charts, even if you used the Select all values. Alternatively, a variable may have a very large number of values. Choosing to disable the variable by default will provide significant performance improvements.

Now, when you choose to exclude a variable, it's removed from the query and the condition is replaced with a neutral boolean value (either true or false). This ensures that your query remains valid and returns results for your dashboard. By excluding the variable, you can retrieve all values from the database.

How to configure variable exclusion

  1. In your dashboard, click the edit button.
  2. Then select + Add variable or click on a variable, and select Edit.
  3. Now, you'll be able to see a toggle option to Include variable.

Configure variable options Users viewing a dashboard can include the variable again through the variable dropdown menu. This will allow the user to select specific values for that variable to filter their dashboard.

Include variable toggle

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.