Tutorial | Dashboard management#

Dashboards are key tools for visualizing data. Let’s explore how to use and manage these native tools in Dataiku!

Get started#

Objectives#

In this tutorial, you will:

  • Edit an insight within your dashboard.

  • Filter the dashboard.

  • Share a filtered dashboard.

  • Export it as a PDF.

  • Use sampling on insights and filter tiles.

Prerequisites#

  • A Dataiku 12 instance.

  • A minimum of Dataiku 12.4 and 12.5 to enable cross filter’s Include and Exclude feature, respectively.

  • A basic level of knowledge about Dataiku is helpful. If you’ve never used Dataiku before, try the Core Designer learning path or a Quick Start tutorial!

Create the project#

  1. From the Dataiku Design homepage, click +New Project > DSS tutorials > Core Designer > Dashboard Management.

  2. From the project homepage, click Go to Flow.

Note

You can also download the starter project from this website and import it as a zip file.

Use case summary#

This project is a simplified credit card fraud use case. Using data about transactions, merchants, and cardholders, we have a model that predicts which transactions should be authorized and which are potentially fraudulent.

For the target variable, authorized_flag, a score of:

  • 1 represents an authorized transaction.

  • 0 is a transaction that failed authorization.

Edit the insight#

Let’s edit the pivot table insight added to the Purchase Patterns dashboard.

  1. From the top navigation bar, go to the Dashboards menu and open the Purchase Patterns dashboard.

  2. Click the external link icon next to Avg of purchase_amount by item_category and card_fico_score on transactions_known to open the insight. (Hover over the title to make the icon appear.)

  3. From the top-right corner, click on Edit.

  4. On the left panel, under Filters drop-down menu, click on the More action button of the FICO score filter and Remove filter.

  5. Still on the left panel, in the Format tab, under Display, change Display measures as from Rows to Columns.

  6. Click Save.

  7. On the top-right, click on Back to dashboard to see the modified pivot table.

Note

If you return to transactions_known dataset and find the pivot table used to create the insight, that pivot table will not have these changes since insights and charts are independent objects. You can learn more about chart insights in the reference documentation.

Filter the dashboard#

We often need to provide the end user of a dashboard with the ability to interact with the insights on display. You can add data filters to an individual insight on its Edit tab, just like you would for a chart.

However, it also can be useful to have a filter that operates at the level of an entire dashboard slide. This way, multiple insights on the same dashboard slide can be subject to the same data filters.

Note

Dataiku v12.6 introduces a new way to filter the dashboard with a filter panel instead of a filter tile. Hence, the documentation about filters is divided into the two options. They are simply referred to as filters when the behavior is the same for both.

Add filters#

Let’s demonstrate how a filter tile works at the dashboard slide level.

  1. From the dashboard’s Edit mode, click the blue + button to add a new tile.

  2. Choose a Filters tile.

  3. In this case, choose Existing tile, and in the Source tile option, select Avg of purchase_amount by item_category and card_fico_score on transactions_known (i.e. the chart insight for the pivot table on transactions_known).

    Note

    As the filter we add to the dashboard refers to a dataset, we could also have chosen Dataset instead of Existing tile.

  4. Choose item_category as the column to use for the filter, and click Add.

  5. Adjust the size of the filter tile as needed, and click Save.

  6. Click on View to see the results. As you can see, by default, all item categories are selected.

Let’s demonstrate how the filter panel works at the dashboard slide level.

  1. From the Edit mode, click the blue + Add Filters button to add a new filter.

  2. Choose Existing tile then select the Avg of purchase_amount by item_category and card_fico_score on transactions_known tile (i.e. the chart insight for the pivot table on transactions_known).

    Note

    As the filter we add to the dashboard refers to a dataset, we could also have chosen Dataset instead of Existing tile.

  3. Choose item_category as the column to use for the filter.

  4. Click Set filter.

  5. Click Save.

  6. Click on View to see the results. As you can see, by default, all item categories are selected.

Dataiku screenshot of the creation of a dashboard filter.

Use the cross filters#

Let’s say while presenting the dashboard in View mode, you are questioned on a specific date or category of the data. The cross filters feature allows for dynamically filtering tiles in View mode by clicking on the existing tiles of the dashboard. For this example, assume we are interested in transactions with no signature provided, during the peak in December 2017, and only the items of the categories A, B, and C.


Note

In the Edit mode, in the Slide tab, verify that cross filtering is enabled as soon as a filter tile is set.


Note

From the Edit mode, in the Page settings panel on the left, you can verify that cross filtering is enabled.

  1. In the View mode, on the transaction table insight, navigate to the signature_provided column.

  2. Right-click on a cell including a 1 and and select Include only 1.

  3. Still on the transaction table, navigate now to the item_category column.

  4. Right-click on a cell including a D and and select Exclude D.

  5. On the Number of transactions by month bar chart tile, right-click on the 2017-12-01 bar and select Include only purchase_date - 12/2017.

  6. Navigate back to the Edit mode.

You can notice that the cross filters set in View mode are temporary. Leaving the View mode or the Dashboard page will discard the filters set as they should remain dynamic for a presentation purpose. The filters can also be used in View mode.

Use filters in View mode#

Let’s see the filter tile in action!

  1. In View mode, in the filter tile, deselect categories B, C, and D. Just like when applying a cross filter, the insight tiles are dynamically updated.

  2. In the filter tile, from the More options menu of the item_category filter, select Disable filter to deactivate the filter, and see how the data has returned to the insights.

Let’s see the filter panel in action!

  1. In View mode, in the filter panel on top, click on the dropdown of the filter item_category.

  2. Deselect categories B, C, and D. Just like when applying a cross filter, the insight tiles are dynamically updated.

  3. From the More options menu of the item_category filter, select Disable filter to deactivate the filter, and see how the data has returned to the insights.

Dataiku screenshot of changing and disabling a filter.

Change the default selections in the filter tile#

To change the default selections for the filter tile, you must use the Edit mode.

  1. From the dashboard’s Edit mode, select the filter tile.

  2. In the Tile tab, we can adjust settings, including the default selections. Check only the box for category A, and click Save.

  3. Navigate back to the View mode to see that the default filter has changed, but the user can still make new selections.

  1. From the Edit mode, select the item_category filter.

  2. Check only the box for category A, and click Save.

  3. Navigate back to the View mode to see that the default filter has changed, but the user can still make new selections.

Share a filtered dashboard via the URL#

Once you have filtered your dashboard, you can share the filtered view with other users by generating a URL containing all the filter parameters. This URL can then be shared with others.

  1. In the filter tile, click the Copy URL in clipboard button in the header. This action automatically computes the URL with the relevant filter parameters and copies it to your clipboard.

    Copy the URL of the filtered dashboard.
  2. Paste it anywhere to share it with the other stakeholders.

  1. Still in View mode, click on the More options button in the filter panel.

  2. Click the Copy URL button in the header. This action automatically computes the URL with the relevant filter parameters and copies it to your clipboard.

Copy the URL of the filtered dashboard.

Note

The syntax of the generated URL is as follows:

${DASHBOARD_ID}_{DASHBOARD_NAME}/view/${VIEW_ID}?${FILTER_QUERY}

The filter parameters change based on the filtering options you select in the filter tile header (Include other values or Exclude other values). For further information on the generated URL, see the documentation on Filters query parameter syntax.

Export a filtered dashboard as a PDF#

You can also export a dashboard as a PDF with the filter parameters active in View mode. This can be done via the Dataiku interface or via the REST API.

Export using the Dataiku interface#

  1. Go to the View mode.

  2. In the right panel, select the Actions tab, then Export.

  3. Keep the default settings and click Export Dashboard.

The PDF will be downloaded to your file system and include the dashboard view with your selected filters.

Export using the REST API#

You can also use the REST API to export the dashboard using the export endpoint. In such case, the syntax of the POST URL is:

https://DSS_HOST:DSS_PORT/public/api/projects/{PROJECT_KEY}/dashboards/{DASHBOARD_KEY}/actions/export

Note

In the POST URL, {DASHBOARD_KEY} is the key of the dashboard, not the slide. So if the dashboard URL is:

https://DSS_HOST:DSS_PORT/projects/QS_AI_CONSUMER_1/dashboards/oLeWRKL_purchase-patterns/view/GcHERXM

The POST URL should be:

https://DSS_HOST:DSS_PORT/public/api/projects/QS_AI_CONSUMER_1/dashboards/oLeWRKL/actions/export

The body of your request should look like this:

{
  "paperSize": "A4",
  "orientation": "LANDSCAPE",
  "fileType": "PDF",
  "width": 2505,
  "height": 1771,
  "filtersBySlide": ["item_category:\"A\""]
}
Example of an API call to export your dashboard.

What’s next?#

Congratulations! You’ve managed, edited, and filtered a dashboard that is ready to be shared with stakeholders.

The next step might be publishing the dashboard on a workspace.

Note

Consult the reference documentation to learn more about dashboards, including insights.

To learn more about visualization with code, such as webapps and static insights, you might want to check out the Academy course on Visualization.