Filter an Embedded Dashboard with a URL Parameter

You embed dashboards in other web applications using the iframe URL. You can add a parameter to the URL and embed a dashboard to display only a subset of the information the dashboard shows. Thus, you can provide some users with a simplified version of an otherwise complex dashboard.

If you are looking for information about how to filter an embedded report, see Filter an Embedded Report with a URL Parameter.

For example, you have a dashboard that shows information about all the groups in your organization, and you want to make the dashboard available through another application with only a subset of groups displayed.
Dashboard filtered by URL parameter

In the picture above, the filter with a URL parameter limits the information that appears in an embedded dashboard, but it does not remove any attribute values from the Group dashboard filter's drop-down list. All the groups continue to appear in the Group filter. However, only the hard-coded groups specified in the embedding code filter the report. The other groups are selectable but have no effect on the dashboard.

For filtering an embedded dashboard, you can use any attribute that is compatible with your project logical data model and not just those attributes that are used as dashboard filters.

Contents:

Limitations

When filtering a dashboard with a URL parameter, consider the following:

  • Adding a URL parameter to the URL of the dashboard increases the number of characters in the URL. Some browsers may limit the total length of the URL. We recommend that you keep the URL below 2000 characters.
  • The filtering applies to all the reports on the dashboard. You cannot dissociate it from certain reports as you would do with dashboards filters (see Dissociate Dashboard Filters from a Report).
  • If the embedded dashboard has a URL parameter and at the same time has a dashboard attribute filter (see Filter for Attributes) that uses the same attribute as the URL parameter, the reports on the dashboard are filtered but the attribute filter itself is not set to the specified attribute value. This may be confusing for dashboard users.

For a more powerful and flexible way of adding filters, try the embedded dashboard method of applying attribute and date filters to an embedded dashboard (see "Apply attribute and date filters to a dashboard" in Embedded Dashboard Methods).

Filter a Dashboard with a URL Parameter

In this example, you are using another dashboard tab in your project as the target embedded dashboard, instead of embedding it in an outside application. However, the technique to apply this procedure to an outside application is very similar. This procedure alternates between two dashboards - source and target. It may be helpful to have both dashboards open in a single browser and to use a text editor for staging the code that you copy and paste.

Steps:

  1. Open both dashboards in a single browser (recommended).
  2. In the source dashboard, open the desired tab.
  3. Copy the tab's object identifier value (a424c3eaf1df in this example).
    From the end of the URL, copy the string of text following the pipe symbol (|). Paste it in the text editor for use later in this procedure.

    https://secure.gooddata.com/#s=/gdc/projects/8thc020r46ru5mej90dewtxsdmfdmn9w|projectDashboardPage|/gdc/md/8thc020r46ru5mej90dewtxsdmfdmn9w/obj/1018371|a424c3eaf1df
  4. In the source dashboard, click the Gear icon, and then click Embed.
  5. Expand the Set URL Parameter Filters section, click select attribute..., and then select the attribute that you want to filter (Group, in this example).
  6. In the Attribute Wild Card field, enter the attribute values that you want the dashboard to display (Support and Technical Support, in this example).
    Separate multiple values with commas and no spaces. Multiple attribute values within the same filter are joined using the OR or AND logical operators.
    When the attribute name/value pair has been populated, the code snippet is automatically updated.
    Adding URL parameters to the embed code

  7. Copy the HTML code and paste it into a text editor for use later.
  8. Click Close.
  9. Open the target dashboard, click the Gear icon, click Edit, and then click Web Content.
  10. In the Add Web Content dialog box, paste the HTML code that you copied from the source dashboard.
  11. If you enter multiple attribute values in the wildcard field in step 6, add vals= immediately to the left of the attribute value, as shown in the below:
    Multiple parameters are prepended with vals in the URL
  12. Click Save.
  13. Drag the dashboard to the desired location.
  14. If the dashboard has multiple tabs:
    1. With the dashboard selected, click the Link icon.
      Link icon
    2. At end of the web address, enter &tab= followed by the tab's object identifier that you copied from the source dashboard. For more information, see Configure an Embedded Dashboard to Display a Specific Tab.

      Inserting tab identifier as an URL parameter
  15. (Optional) To hide the header of the embedded dashboard, enter &nochrome=true in the Add Web Content dialog box.

    Hiding the header from a multi-tab dashboard saves spaces and removes all the tabs except the tab that you specify. This is an effective way to limit the information that users can see. For more information, see Hide the Header of an Embedded Dashboard.

  16. Click Save to close the Add Web Content dialog box.
  17. Click Save in the upper right of the dashboard to exit edit mode.
  18. Refresh the dashboard.


Multiple filters based on different attribute labels are combined using the AND logical operator.

To make your embedded dashboard dynamic, add an attribute value wildcard that your system can programmatically replace with an appropriate value. You can thus filter data in different ways to use with different types of users. For example, your system can replace the region_parameter wildcard with East, and so on.