Let’s Get Certified
Module 09 / 13 · Dashboards and visualizations

Design dashboard datasets and parameters

Set a dataset grain, choose a visualization and bind controls to typed query parameters.

Design dashboard datasets and parameters

Work through the decision

A dashboard has a city overview and a station detail page. The station selector changes the map but leaves the total at its all-stations value. The author believes both widgets automatically share a filter because they appear on one page. What should they inspect?

Check your reasoning

Trace each widget to its dataset. Inspect whether a field filter or query parameter is mapped to that dataset and whether the control should affect both. Define the intended denominators with the business owner. An explicitly labeled citywide total may properly stay fixed, while a selected-station total must be recomputed.

Watch the source lesson at 1:32:34

Compare the choices

Dashboard dataset
Define the rows and columns feeding one or more widgets. Establish the data grain and freshness before choosing chart encodings.
Page and widget layout
Use pages to organize separate audience questions and widgets to communicate metrics, context or detail.
Typed query parameter
Bind a defined value to the dataset query and connect controls to the intended parameter. Test range and empty-result behavior.
Editor or notebook visualization
Use an exploratory chart on a verified result set to check units, categories and trend before publishing a dashboard.

Test the decision

Compare the SQL editor or notebook result with the widget using a known station and day. Test an unknown station and boundary dates. Use a typed parameter such as :service_day and inspect the resulting rows; do not build query text by concatenating raw user input.

Bind the reporting day to the query

SELECT station_id, COUNT(*) AS boardings
FROM ticketing.gold.boardings
WHERE service_day = :service_day
GROUP BY station_id
ORDER BY boardings DESC, station_id
Check the result

Define service_day as a date parameter in the dataset and bind the dashboard control to it. Verify a known day, an empty day and a day with ties. The station key gives ties a predictable order.

Practice the guide skills

  1. Design a daily overview and a station drilldown in one AI/BI dashboard. Watch 1:32:34 · Continue at 1:32:59
    Check your answer

    Use separate pages with purpose-built datasets and widgets. Define the scope and refresh time for each dataset, then keep metric definitions consistent across both pages.

  2. Compare weekly demand in a notebook and the SQL editor. Watch 1:33:53
    Check your answer

    Produce one row per week, select a line chart with a chronological horizontal axis and compare the result with a small tabular sample before sharing.

  3. Add day and station parameters. Watch 1:37:58 · Continue at 1:38:19
    Check your answer

    Use typed parameters in the dataset query and connect dashboard controls to them. Test defaults, boundary dates, an empty result and the effect on each intended visualization.

Official objectives for this lesson

Related lesson · Choose a visual, calculation and delivery format for the reader

Knowledge check

Design dashboard datasets and parameters quiz

Answer 3 questions. Check each answer for an explanation.