CertSafari
    Snowflake SnowPro Advanced: Data Analyst (DAA-C01)· Lessons

    Domain 4 · Lesson 19/19

    Snowsight charts and dashboard troubleshooting

    Given a use case, incorporate visualizations for dashboards and reports.

    20 min read
    9.33% of exam
    8 sources
    Published 20 Oct 2026
    Docs as of 4 Oct 2026

    What you will be able to do

    • Choose a Snowsight chart type (bar, line, scatterplot, heat grid, scorecard) that fits a trend, comparison, relationship or headline-number question, and map result columns to its axes
    • Set the time grain of a trend chart, either in the chart's own bucketing or with :datebucket so viewers can change it, and choose an aggregation that fits skewed data
    • Show a correlation as a scatterplot with a CORR scorecard beside it
    • Slice the same charts with filters, and know the difference between Apply and Save
    • Diagnose empty, wrong, stale or slow dashboard tiles from their role, filter, cache and query-profile causes

    Key concept

    A chart is an encoding of a query result — A Snowsight chart has no data of its own. It maps the columns of a query's result to chart parts such as axes, buckets and aggregations, and it redraws whenever that result changes. Choosing, editing and debugging a visualization therefore always means asking two things: which columns the query returns, and how the chart encodes them.

    1.Matching a chart type to the business question

    A Snowsight chart is one view of a query's result set. When you select Chart above a worksheet's results, Snowsight generates a chart from those results, and each query can show one chart type at a time. A good chart lets a viewer spot patterns and outliers that a table of numbers hides. A poor choice hides them just as well as the table did.

    Snowsight has five chart types: bar, line, scatterplot, heat grid and scorecard. Choose the type from the question you are answering, not from the columns you happen to have. Trends over time or over ordered categories read best as a line. Comparisons between separate categories, such as revenue per region, read best as bars. A relationship between two numeric measures needs a scatterplot. A single headline number, such as this quarter's total revenue, belongs on a scorecard.

    Which Snowsight chart answers which question
    Question the viewer asksSnowsight chartHow to map the result columns
    How did a measure move over time?Line chartsDate or timestamp column on the X-axis, aggregated measure on the Y-axis
    Which category is bigger?Bar chartsCategory column for the bars, aggregated measure for bar height
    Does one measure rise or fall with another?ScatterplotsOne numeric column on the X-axis, the other on the Y-axis, one point per result row
    What is the one number that matters?ScorecardsA query that returns a single value
    How does a value vary across a grid of cells?Heat gridsStyle the grid in the Appearance section

    You set encodings in the chart's Data section. There you add or remove columns, choose which result column feeds each part of the chart, and change how a column's data is shown. On a scatterplot, put the driver on the X-axis and the outcome on the Y-axis. Each result row then becomes one point. Hovering over a point shows its details, so a viewer can find out which day the outlier is. Colors, labels and other styling are in the Appearance section, and the options there depend on the chart type.

    A wrong chart fails in a predictable way. Suppose an analyst has daily ad_spend and revenue and wants to know whether more spend goes with more revenue. A bar per date with spend as the bar height shows one variable over time and says nothing about the other. A scorecard reduces the whole result to one value, so you can no longer compare rows. A heat grid shaded by the count of dates in each cell tells you how many days fell in that cell, not whether revenue rises with spend. Only the scatterplot keeps both measures for every day side by side, so the slope and the spread are visible.

    Checkpoint 1 of 9· Check yourself

    An analyst has a worksheet query that returns daily ad_spend and revenue. To see whether more spend goes with more revenue, they switch the chart to a scatterplot, but revenue ends up on the X-axis and ad_spend on the Y-axis. What should they do to put the driver (ad_spend) on the X-axis?

    Checkpoint 2 of 9· Exam question

    A marketing analyst has a Snowsight worksheet result with daily ad_spend and revenue columns for 400 days. A director asks whether higher spend goes with higher revenue. Which chart type shows this relationship most directly?

    Sources12

    2.Setting the grain and aggregation of a trend chart

    A line of daily values across several years has too many points to read, and the direction of the trend gets lost in day-to-day swings. The fix is a coarser grain, and Snowsight lets you set it in two places: in the chart or in the query.

    The chart is the first place. Charts group continuous numbers, dates and timestamps into buckets. Date columns can be bucketed by date, week, month and year, and numeric columns by integer values. Setting the date column's bucket in the Data section to Month gives one point per month, and the query stays unchanged. Each bucket contains many rows, so the chart reduces them to one value with an aggregation function: average, count, minimum, maximum, median, mode or sum.

    The choice of aggregation matters as much as the grain. A few very large values pull an average well above a typical row, while the median stays in the middle. Picture average order_value by customer_segment, where a handful of enterprise orders worth millions make the bars look misleading. Switching the aggregation to median shows a typical order.

    The query is the second place, through the :datebucket system filter. It groups aggregate data by a period such as day, week, month or year, and it defaults to Day (:daterange and :datebucket system filters). Because :datebucket is SQL, it goes in the query's SELECT and GROUP BY clauses. It is not a chart or axis setting. Once it is in the query, the dashboard shows a Group by button, and each viewer can change the grain of the trend. Pick the default the way you would when downsampling time series with DATE_TRUNC: coarse enough that the line shows a direction, but fine enough that a seasonal dip is not averaged away.

    Orders per time bucket: :datebucket sets the grain and :daterange limits the periodsql
    SELECT
        COUNT(O_ORDERDATE) as orders,
        :datebucket(O_ORDERDATE) as bucket
    FROM
        SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.ORDERS
    WHERE
        O_ORDERDATE = :daterange
    GROUP BY
        :datebucket(O_ORDERDATE)
    ORDER BY
        bucket;

    Use the chart's bucketing when you, the author, fix the grain once. Use :datebucket when different viewers need different grains. Adding LIMIT 12 does neither, because it keeps twelve daily rows and drops the rest. It does not aggregate anything.

    Checkpoint 3 of 9· Fill the gap

    This dashboard query should show a Group by button, so each viewer can switch the trend between day, week, month or year. Which keyword completes the GROUP BY clause?

    SELECT
        COUNT(O_ORDERDATE) as orders,
        :datebucket(O_ORDERDATE) as bucket
    FROM
        SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.ORDERS
    WHERE
        O_ORDERDATE = :daterange
    GROUP BY
         ? (O_ORDERDATE)
    ORDER BY
        bucket;

    Checkpoint 4 of 9· Exam question

    An analyst charts SUM(order_total) by order_date in Snowsight and wants the line chart to show one point per month instead of one point per day. What should they configure?

    Sources13

    3.Showing a correlation: a scatterplot and a CORR scorecard

    A correlation question, such as whether temperature goes with ice cream sales, needs two things on a dashboard: a picture of the relationship and a number for how strong it is. The scatterplot gives the picture. CORR, an aggregate that returns the correlation coefficient for the non-null pairs in a group, gives the number (CORR and correlation).

    The scatterplot shows what a single coefficient cannot: the slope, the spread around it, clusters, and outliers that may be driving the number. Write the query to return one row per observation, such as one row per day rather than a monthly total, so that each point is a real observation.

    The number goes in its own tile. That tile's query returns one value, which you display as a scorecard. The syntax is CORR(y, x), where y is the dependent variable and x the independent one. Rows where either value is NULL are skipped, and a group with no complete pairs returns NULL.

    CORR per group: group 1 has no non-null pair and returns NULLsql
    SELECT k, CORR(v, v2) FROM aggr GROUP BY k;
    
    +---+--------------+
    | K |  CORR(V, V2) |
    |---+--------------|
    | 1 |         NULL |
    | 2 | 0.9988445981 |
    +---+--------------+

    Several look-alike queries are tempting substitutes for CORR on a scorecard: COVAR_POP divided by a constant such as 100, a count of non-null pairs, or a difference between two medians. None of them measures correlation, and the formula shows why. CORR is COVAR_POP(y, x) / (STDDEV_POP(x) * STDDEV_POP(y)): it divides the population covariance by both standard deviations, so the result does not depend on either column's units. COVAR_POP alone is only the numerator. Its size changes with the units, and dividing it by 100 does not turn it into a correlation. A count of non-null pairs tells you how much data you have, not how strongly the columns are related. A difference between two medians compares the levels of two columns that may not even share units.

    Checkpoint 5 of 9· Check yourself

    A scorecard tile on a sales dashboard shows CORR(revenue, temperature) = 0.92, computed from one row per day. Why should the dashboard also have a scatterplot of the same daily rows?

    Checkpoint 6 of 9· Exam question

    A data analyst needs to report how strongly temperature and ice_cream_sales move together as a single number in a Snowflake query that feeds a dashboard scorecard. Which approach returns that value?

    Sources4

    4.Slicing and editing a dashboard without rewriting it

    A dashboard tells a story when its tiles follow the order a reader reasons in: the headline scorecard first, then the trend, then the breakdown, then the relationship that explains it. New tiles are added at the bottom by default, so drag each one into place (Snowsight dashboards built from tiles).

    Filters let one set of charts serve every audience. A custom filter is a named SQL keyword such as :region, with options that come from a list or a query (Custom filters). Add WHERE region = :region to each tile's query, and one Region button slices every chart by region. A product line filter works the same way, and nobody has to edit a query. When a viewer picks options, Snowsight rewrites the predicate as shown below:

    How a filter selection is rewritten into SQL
    Filter option selectedSQL used
    List item<col> = <list_item>
    Multiple list items selected<col> IN (<list_item>, <list_item>)
    All, with Any value specifiedtrue
    All, with Any value in list of options specified<col> IN (<list_item>, <list_item>, ... )
    Other<col> NOT IN(<list_item>, <list_item>, ... )

    The rewrite explains the rules for where a filter can go. A filter must be compared with an equals sign, so it cannot be used with LIKE or CONTAINS. The column must also match the filter's type: a text filter needs a text column (or a cast to text), a number filter needs a numeric column, and a system filter needs a TIMESTAMP column. Filters cannot be used inside stored procedures or UDFs.

    Apply and Save do different things. Apply reruns the dashboard with the new filter values so you can review the result, and nothing is stored. Save stores those values as the default that every user of the dashboard sees. To check something across All time without making that the default, apply All time, read the result, then set Last 7 days, apply it, and save.

    You can change how a tile looks without touching its query. In the tile menu, View Chart opens the chart in a worksheet, where you can change the chart type or encodings, then select Return to followed by the dashboard's name to save. Edit query is a separate action (Editing and maintaining tiles without losing queries).

    Checkpoint 7 of 9· Match them up

    Match each dashboard action to what it does

    Tap a term, then the definition that fits it.

    Checkpoint 8 of 9· Check yourself

    Every tile on a sales dashboard should respond to a custom text filter :product_line, populated from a list of product lines. Which predicate can you add to each tile's query?

    Sources53

    5.Troubleshooting empty, wrong, stale and slow tiles

    When a tile errors for everyone except the author, check the role first. Dashboard queries run in their own sessions, each with an assigned role and warehouse. A viewer must use the same role as that session context, and only their primary role counts. The context selector on the dashboard sets the role and warehouse used to run its queries. If a colleague in the same account sees insufficient-privileges errors on every tile, compare their primary role with the dashboard's role before you look for anything else.

    When two people see different numbers in the same tile, governance is often working as intended. Row access policies decide which rows a query returns, and masking policies that test CURRENT_ROLE look at the role of the current session. Each viewer's role therefore produces its own rows and its own masked values. Before treating the difference as a bug, check which policies are attached to the tables behind the tile.

    An empty or broken tile usually has a cause in the filters or columns. :daterange defaults to Last day and always uses UTC, so a tile filtered on yesterday's local date can come back empty. A filter placed on a column of the wrong type, or compared with anything other than an equals sign, also fails. If a query edit renames a column the chart uses, the chart flags the missing column, and you have to point the chart at the new name.

    Stale numbers come from two caches. Query results are cached, and Run reruns all the queries on the dashboard. Separately, a custom filter whose options come from a query refreshes on a fixed schedule: hourly, daily or never. That refresh runs as the user who created or last changed the filter, so it fails if that user is dropped, disabled, or has not signed in for 3 months, and the dropdown stops picking up new values.

    For a slow tile, start with the tile's query rather than the dashboard. Open the query's Query Details, which show its duration, the data it scanned, and the role and warehouse it ran with. From there, open its Query Profile (Query Profile and EXPLAIN) to see where the time goes. One common cause is a saved All time :daterange default, which makes every viewer who opens the dashboard scan the whole table. Saving a narrower default fixes this for everyone.

    Tile symptoms and where to look first
    SymptomLikely causeFirst check
    Every tile errors for one viewerViewer is not using the dashboard's session role; secondary roles are ignoredViewer's primary role and the context selector
    Values differ between viewers or show masked dataRow access policy or a masking policy that tests CURRENT_ROLEPolicies on the underlying tables
    Tile is emptyDefault :daterange of Last day in UTC, or a filter on a column of the wrong typeFilter defaults and column types
    Chart reports a missing columnA query edit renamed a columnRe-map the column in the Data section
    Filter dropdown lacks new valuesFilter refresh schedule, or the filter's creator is dropped or inactiveFilter refresh frequency and its owner
    Tile loads slowlyLarge scan, often from a saved All time defaultQuery Details, then Query Profile

    Checkpoint 9 of 9· Check yourself

    New regions show up in a dashboard's tiles after a viewer selects Run, but the :region filter dropdown still lists only the old regions. The filter gets its options from a query and is set to refresh hourly, and it has not picked up a new value in weeks. What is the most likely cause?

    Sources567318

    Practise it for real

    See the difference between changing a trend chart's grain in the chart and changing it with :datebucket, using Snowflake sample data.

    1. 1.In a worksheet, run the :datebucket sample query against SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.ORDERS, with the date range filter set to All time and Group by set to Day.

      Why: This gives a daily series that is too dense to read as a trend.

      You should see: One row per day with an orders count, starting in 1992.

    2. 2.Select Chart above the results and choose a line chart, with bucket on the X-axis and orders on the Y-axis.

      Why: A line chart is the right type for a trend over time.

      You should see: A dense, noisy line with one point per day.

    3. 3.Set the Group by filter to Week and select Apply.

      Why: :datebucket changes the grouping inside the query, which is the control a dashboard viewer would use.

      You should see: Weekly totals, such as 3142 orders for the bucket starting 1991-12-30, and a smoother line.

    4. 4.In the chart's Data section, change the bucketing of the bucket column to Month and set its aggregation to sum.

      Why: Chart-level bucketing changes the grain again without editing the SQL.

      You should see: One point per month, while the query text stays the same.

    Stuck? Get a nudge

    If the chart ever reports a missing column, check that the query still returns a column named bucket.

    Sources

    (8)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Charts let you quickly identify and understand patterns and outliers in data.”
      ↩︎ Matching a chart type to the business question
      “Each query supports one type of chart at a time.”
      ↩︎ Matching a chart type to the business question
      “Choose a different column in the query results to use in the chart.”
      ↩︎ Matching a chart type to the business question
      “Charts use aggregation functions to determine a single value from multiple data points in a bucket.”
      ↩︎ Setting the grain and aggregation of a trend chart
      “Charts indicate any columns that cannot be found.”
      ↩︎ Troubleshooting empty, wrong, stale and slow tiles
      “Your chart updates automatically as long as the columns used by the chart are available in the query results.”
      ↩︎ Key concept
      “Without modifying your query, you can easily select a different bucket of time”
      ↩︎ Exam trap 1
      “You can manage the columns in your chart with the Data section”
      ↩︎ Checkpoint
      “Charts can bucket by date, week, month, and year for date columns.”
      ↩︎ Prediction
      “Charts let you quickly identify and understand patterns and outliers in data.”
      ↩︎ Checkpoint
    2. 3.
      “:datebucket Groups aggregate data by a period of time”
      ↩︎ Setting the grain and aggregation of a trend chart
      “Custom filters let you change the results of a query without directly editing the query.”
      ↩︎ Slicing and editing a dashboard without rewriting it
      “For a system filter, the column must be a TIMESTAMP data type.”
      ↩︎ Slicing and editing a dashboard without rewriting it
      “letting you review the changes without saving.”
      ↩︎ Slicing and editing a dashboard without rewriting it
      “The date range filter always uses the UTC time zone”
      ↩︎ Troubleshooting empty, wrong, stale and slow tiles
      “The user is inactive because they have not signed in for 3 months.”
      ↩︎ Troubleshooting empty, wrong, stale and slow tiles
      “You can only use an equals sign as the comparator for a filter, and as such, cannot use a filter with LIKE or CONTAINS.”
      ↩︎ Exam trap 3
      “When you select Save, the changes you made to the dashboard are saved and available to other users of the dashboard.”
      ↩︎ Exam trap 4
      “When you select Save, the changes you made to the dashboard are saved and available to other users of the dashboard.”
      ↩︎ Checkpoint
      “You can only use an equals sign as the comparator for a filter, and as such, cannot use a filter with LIKE or CONTAINS.”
      ↩︎ Checkpoint
      “The user that created or last modified the filter has been dropped or disabled in Snowflake.”
      ↩︎ Checkpoint
    3. 4.
      “Returns the correlation coefficient for non-null pairs in a group.”
      ↩︎ Showing a correlation: a scatterplot and a CORR scorecard
      “Where x is the independent variable and y is the dependent variable.”
      ↩︎ Showing a correlation: a scatterplot and a CORR scorecard
      “COVAR_POP(y, x) / (STDDEV_POP(x) * STDDEV_POP(y))”
      ↩︎ Exam trap 2
    4. 5.
      “To rearrange the tiles on a dashboard, drag a tile to a new position.”
      ↩︎ Slicing and editing a dashboard without rewriting it
      “To view shared dashboards, the Snowflake user must use the same role as the session context for the queries that drive the dashboard.”
      ↩︎ Troubleshooting empty, wrong, stale and slow tiles
      “Dashboards run exclusively with the user’s primary role, regardless of the value set for DEFAULT_SECONDARY_ROLES.”
      ↩︎ Exam trap 5
      “Dashboards run exclusively with the user’s primary role, regardless of the value set for DEFAULT_SECONDARY_ROLES.”
      ↩︎ Prediction
    5. 6.
      “Masking policy conditions using CURRENT_ROLE target the role in use for the current session.”
      ↩︎ Troubleshooting empty, wrong, stale and slow tiles
    6. 7.
      “Snowflake supports row-level security through the use of row access policies to determine which rows to return in the query result.”
      ↩︎ Troubleshooting empty, wrong, stale and slow tiles

    Spotted a mistake, or was something unclear? Tell us.