Creating Report Variables

Report variables are defined at the report level but used to filter charts. Report variables can be created at any time to an existing report or added when creating a new report.

Some chart types do not allow for use of variables with the primary data selection because you do not select specific entities. An example would the Top N Chart. However, you can still use variables in metric filters for charts, to create relationships in any chart type that allows filtering.

If your report includes chart types that do not specify entities (such as Top N Chart), those charts are not affected by use of a variable on other charts in the report.

You can add multiple variables to a report and associate the variables with various entity types.

Tip

It saves some steps if you first create the variables you want for a report, then select the variables as you add the charts to the report.

  1. Navigate to the Reports or Reports Templates page.

  2. Click New Report or open an existing report.

  3. Define new variables for the report by selecting Edit Variables

    createreportvariable1.png
  4. Use the + sign to add a new variable. 

    vw-scrn-report-variables-edit.png

    Select the entity type to be used in the variable.

    The variable is named automatically but you can change the name using the second field. Only letters, numbers, underscores, and periods are allowed in the name.

    Optional: Select a specific entity value in the third field.

  5. The variable is displayed at the top of the page.

    createreportvariable3.png
  6. The variable can now be used to filter charts in your report. To add a variable to a chart, click vw-icon-report-edit-button.png to edit the chart.

  7. On the Chart Data Page, select an entity type in the first field.

    vw-scrn-report-variables-add.png

    In the second field, select from the list of report variables.

    In the third field, select a metric value.

  8. Click OK. The report page displays. You can now populate the report variable and the chart will be filtered for the value selected for the variable.

    vw-scrn-report-variables-select.png

Changing Report Variables Using a URL

You can change the entity value for a report template variable either from the variable field on the report page, or by passing the entity name in a URL.

Prerequisites

  • The report you want to work with must have been saved.

  • The variable name must have been associated with the charts in the report.

  • You need to know the names of the variable templates you want to use and the names of the entities for which you want to view data.

Steps

  1. Navigate to the Reports or Report Templates page and select a saved report.

    The browser URL field displays the static ID of the report in the format:

    https://appliance-id/#tab-name/page-name/report-uid

    The appliance name/ID + tab/page name + UID = the static URL of the report.

  2. In the URL field, add the variable and entity name after the report ID in the format:

    /variable-name=entity-name

    Example:

    https://198.51.100.5/#reports/template/e9678-123-8910-b23eio/ESXCluster_test=Cluster_1

    198.51.100.5 = IP address (or name) of the VirtualWisdom appliance

    #reports/template = The names of the tab and the page in the VirtualWisdom UI

    e9678-123-8910-b23eio = The UID of the report

    ESXCluster_test = The template variable name

    Cluster_1 = The entity value

  3. Click Enter.

    The report page updates with the new data and the variable name and entity value display above the charts.

    Tip

    If you select a different entity using the field in the UI, it updates the data on the page for that entity, but the URL does not change to reflect the new entity name.

Example 1. Example: Using a URL to Pass Report Variables

The following images show how adding the template variable name and entity value to a report's static URL changes the data displayed in a report.

vw-scrn-report-variables-URL.png
vw-scrn-report-variables-URL2.png