Skip to main content

Filter dashboard charts with calculated fields

Instead of hardcoding row limits on charts, you can let dashboard viewers control how many items they see. For example, users could switch between viewing the top 10, top 15, or top 20 products by sales.This guide walks through creating a dynamic Top N filter using a RANK calculation and dashboard filter mapping.

Requirements

  • A dashboard that:
    • You have the ability to edit
    • Has at least one visualization tile
  • Familiarity with calculations

Steps

1

Add a calculated field to the query

In a draft workbook, add the calculation to the query that powers your chart. In this example, we added a RANK calculation that uses the value of the Total Sold column to rank results:Before continuing, remove the row limit from the query if one is applied. The filter you’re creating will control this instead.You can add the calculation manually or by using the Query Helper. Refer to the Table calculations guide if you need a refresher.
2

Create a numeric dashboard filter

  1. Navigate to the dashboard by clicking the Dashboard button in the top right corner of the page.
  2. Click Add > Filter.
  3. For the filter source field, select any numeric field included in the query. In this example, we selected the Total Sold field. Note: This field only establishes the filter type - you’ll map it to the calculation field in the next step.
  4. Give the filter a descriptive label.
3

Map the filter to the calculation

  1. While still in the Edit filter panel, scroll to the Filter mapping section.
  2. Deselect tiles that don’t contain the calculation. The filter should only apply to those that have the calculation.
  3. Search for the name of the calculation, or scroll down to the Calculations group. Select the calculation:
  4. Verify that the tile is mapped to the calculation:
  5. Click Done to save the filter.
The filter will be added to the dashboard:
4

Publish your changes

The last step is to publish the changes to the document. This will make the filter available for the viewers of your dashboard.Click the Publish button near the top right corner of the page.
If you don’t see the Publish button, your instance settings may not allow publishing without using a branch. Refer to the Developing and publishing content guides for more information.