Create sparklines in a table or matrix in a Power BI report (preview)
APPLIES TO:
Power BI Desktop
Power BI service
A good way to add meaning to a table or matrix is to add sparklines. Sparklines are tiny charts shown within cells of a table or matrix that make it easy to see and compare trends quickly. Sparklines are currently in preview. You can use them to show trends in a series of values, such as seasonal increases or decreases, economic cycles, or to highlight max and min values.
Turn on the sparklines preview
Sparklines should be on by default. If you don't see the option to add them, here's how to turn on the feature.
- In Power BI Desktop, go to File > Options and settings > Options > Preview features, and select Sparklines.
Video
Watch this video showing how to add sparklines, and then try it yourself.
Note
This video might use earlier versions of Power BI Desktop or the Power BI service.
Add a sparkline
After you enable the preview feature, you can add sparklines to both your table and matrix visuals.
Create a table or matrix.
Select the dropdown arrow next to one of the numeric fields, and select Add a sparkline.
In the dialog box, you configure the details of your sparkline. The numeric field you started with is prepopulated for the Y-axis. You can change both the field and Summarization type, if needed. You also need to select a field, typically a date field, to use as the X-axis of the sparkline.
Read more about working with auto date/time fields in Power BI Desktop.
Select Create. The sparkline is automatically added to your table or matrix as a new column.
Edit the sparkline
Now you can edit the sparkline’s properties.
Select the dropdown arrow next to sparkline, and select Edit sparkline.
In the Sparklines card in the Format pane, modify the sparkline line and marker formatting. Change the line color and width, add markers for different value types (highest, first, last, and so on), and change the marker size, color, and shape.
The Format pane is also where you change the chart type from a line to a column chart.
Considerations and limitations
- Power BI supports up to five sparklines per visual, and displays up to 52 points per sparkline.
- For performance reasons, the maximum number of columns in a matrix is also limited to 20 when sparklines are on.
- Sparklines are supported on Azure Analysis Services, but currently not supported on on-premises SQL Server Analysis Services.
- Visuals with sparklines don't support pinning to a dashboard.
Related content
More questions? Try the Power BI Community