docs-v2/content/v2.0/visualize-data/variables/create-variable.md

2.0 KiB

title seotitle description menu weight v2.0/tags
Create a variable Create a dashboard variable Create dashboard variables in the Data Explorer, from the Organization page, or import a variable.
v2_0
parent
Use and manage variables
201
variables

Create dashboard variables in the Data Explorer, from the Organization page, or import a variable. Variable names must be unique.

For information about variable types, see Variable types.

Create a variable in the Data Explorer

{{% note %}} Only Query variables can be created from the Data Explorer. {{% /note %}}

  1. Click the Data Explorer icon in the sidebar.

    {{< nav-icon "data-explorer" >}}

  2. Click Script Editor on the lower right.

  3. Build the query for your variable using the Table visualization type or enable the View Raw Data option.

  4. Click Save As in the upper right.

  5. In the window that appears, select Variable.

  6. Enter a name for your variable in the Name field.

  7. Click Create.

Create a variable in the configuration page

  1. Click the Settings icon in the navigation bar.

    {{< nav-icon "settings" >}}

  2. Select the Variables tab.

  3. Click +Create Variable.

  4. Enter a name for your variable.

  5. Select your variable type.

  6. Enter the appropriate variable information.

  7. Click Create.

Import a variable

  1. Click the Organizations icon in the navigation bar.

    {{< nav-icon "orgs" >}}

  2. Select an organization from the list.

  3. Select the Variables tab.

  4. Click the +Create Variable dropdown menu and select Import Variable.

  5. In the window that appears:

  • Select Upload File to drag-and-drop or select a file.
  • Select Paste JSON to paste in JSON.
  1. Select an organization from the Destination Organization dropdown.
  2. Click Import JSON as Variable.