Loading...

Sparklines

Sparklines

Most of the time, all you need in a table is data as text and numbers. But sometimes, you’d like to visualize results in each row, too. That’s especially true when each row of data is a trend over time.

You can do that inside a table column with tiny charts called sparklines. Sparklines is the perfect solution for visualising tabular data with the idea of placing the visualisations ‘in-line’ with the other data.

The example below will take you through the steps to create a sparkline on metric data in your tabular report.

  1. Create a new report based on the Ski Team view.

    Create new report

  2. Add the Demographic and Month fields into the Columns area. Add the Invoiced Amount field twice.

    We’ve added two copies of the Invoiced Amount field in order to apply an Advanced Function to one of them.

    Columns Area

  3. Open the field menu of the first Invoiced Amount field and select Advanced Function.

    Advanced Function

  4. In the Advanced Function popup, select the Analysis function type. Then choose Sparkline Array Analytic Function from the list of functions.

  5. Choose the Month field for the Date Field attribute. This field will be used to aggregate the Invoiced Amount values to create a comma separated list. Note that it will appear blank in the report table, as the Invoiced Amount metric now represents data from multiple dates. You can also hide the blank date field. The rest of the rest of the settings can be left unchanged.

    Sparkline Array Analytic Function

    You can also specify how the missing values in the date field should be filled and whether or not to use a scaling value for the sparkline.

  6. Click Save.

    You will notice that the Month field is now blank, the Invoiced Amount column was renamed to “Roll Up Invoiced Amount” and the value was changed to a comma separated list of values, one for each month.

    Rolled Up Values

  7. Open the Column Formatting menu.

    Column Formatting

  8. Select the Month column, and hide the column using the Show Field toggle box.

    Hide Month field

  9. Select the Roll Up Invoiced Amount column, rename it to ”Monthly Sales” and change the format to SparkLine Formatter. This will convert the values into sparklines.

    Monthly Sales

    You can also specify the width and height of the sparkline.

  10. Rename the Sum Invoiced Amount column to “Sales”.

    Monthly Sales

  11. Close the Column Formatting popup to view the sparkline in the tabular report.

    Report with Sparkline

  12. Publish the report.