Sparklines and data bars in a paginated report (Power BI Report Builder)
APPLIES TO: Power BI Report Builder Power BI Desktop
Sparklines and data bars are small, simple charts in a paginated report that convey a lot of information in a little space, often inline with text.
In reports, sparklines and data bars are often used in tables and matrices. Their impact comes from viewing many of them together and being able to quickly compare them one above the other, rather than viewing them singly. They make it easy to see the outliers, the rows that are not performing like the others. Although they are small, each sparkline often represents multiple data points, often over time. Data bars can represent multiple data points, but typically illustrate only one. Each sparkline typically presents a single series. You cannot add a sparkline to a detail group in a table. Because sparklines display aggregated data, they must go in a cell associated with a group. Sparklines and data bars have the same basic chart elements of categories, series, and values, but they have no legend, axis lines, labels, or tick marks.
To quickly get started with sparklines, see Tutorial: Add a Sparkline to Your Report (Power BI Report Builder) and the videos How to: Create a Sparkline in a Table and Sparklines, Bar Charts, and Indicators in Power BI Report Builder .
Types of sparklines
You can create almost as many types of sparklines as there are regular charts. In general, you cannot make 3D sparklines. You can make sparkline versions of these full charts:
Column Charts (Power BI Report Builder): The basic, stacked, and 100% stacked column charts.
Line Charts (Power BI Report Builder): All except the 3D line chart.
Area Charts (Power BI Report Builder): All except the 3D area charts
Pie Charts (Power BI Report Builder): And doughnut charts, both flat and 3D, but not the other shapes such as funnel and pyramid charts.
Range Charts (Power BI Report Builder): The stock, candlestick, error bar, and box plot charts.
Data bars
Data bars typically represent a single data point, though they can represent multiple data points, just like regular bar charts. They often contain several series with no category, or have series grouping.
In this example using stacked data bars, each data bar, although only one bar, illustrates more than one data point. For example, the three different colors of the bar could represent tasks of three levels of priority with the length of the bar representing the total number of tasks assigned to each person. If you made these 100% stacked data bars instead, each bar would fill the cell, and the different colors would represent the percentage of the whole for each priority level.
You can make data bar versions of these full charts:
Bar Charts (Power BI Report Builder): Basic, stacked, and 100% stacked bar charts.
Column Charts (Power BI Report Builder): Basic, stacked, and 100% stacked column charts. Column charts can be either sparklines or data bars.
Align sparkline data in a table or matrix
When you insert a sparkline in a table or matrix, it is usually important for the data points in each sparkline to align with the data points of the other sparklines in that column. Otherwise it is hard to compare the data in the different rows. For example, when you compare sales data by month for different salespeople in your company, you would want the months to align. If an employee was out for the month of April, there would be no data for that employee for that month. You would want to see a gap for that month, and see the data for subsequent months align with the data for the other employees. You can do this by aligning the horizontal axis. For more information, see the section about sparklines in Expression Scope for Totals, Aggregates, and Built-in Collections (Power BI Report Builder), and see Align the Data in a Chart in a Table or Matrix (Power BI Report Builder).
Likewise, to be comparable across rows, data must also align vertically, meaning that the height of the bars or lines in one sparkline or data bar must be relative to the height of the bars and lines in all the other sparklines or data bars. Otherwise, you can't compare the rows to each other.
In this image, the column chart shows daily sales for each employee. Note that for days that an employee has no sales, the chart leaves a blank and aligns subsequent days. This is an example of horizontal alignment. Also note that for some employees, every bar is short, and no bar reaches the top of the cell. This is an example of vertical alignment; without it, in the rows with no tall bars, the short bars would expand to fill the height of the cell.
Understand the data supplied to a sparkline or data bar
When you add a sparkline or data bar to a table or matrix, this is referred to as nesting one data region inside another. Nesting means that the data supplied to the sparkline or data bar is controlled by the dataset that the table or matrix is based on, and by where you put it in the table or matrix. For more information, see Nested Data Regions (Power BI Report Builder).
Convert a sparkline or data bar to a full chart
Because sparklines and data bars are just a kind of chart, if you decide you would rather have the full chart functionality, you can convert one to a full chart by right-clicking the chart and selecting Convert to Full Chart. When you do, the axis lines, labels, tick marks, and legend are added automatically.
Note
You cannot convert a full chart to a sparkline or data bar with one click. However, you can make a sparkline or data bar from a full chart just by deleting all the chart elements that are not in sparklines and data bars.
How-to topics
Add Sparklines and Data Bars (Power BI Report Builder)
Align the Data in a Chart in a Table or Matrix (Power BI Report Builder)
Related content
Because sparklines and data bars are a type of chart, you might also find the following topics for charts helpful and relevant.
- Charts (Power BI Report Builder)
- Tutorial: Add a Sparkline to Your Report (Power BI Report Builder)
- Add a Chart to a Report (Power BI Report Builder)
- Add Empty Points to a Chart (Power BI Report Builder)
- Add or Remove Margins from a Chart (Power BI Report Builder)
- Change a Chart Type (Power BI Report Builder)
- Define Colors on a Chart Using a Palette (Power BI Report Builder)
- Show ToolTips on a Series (Power BI Report Builder)
- Specify a Logarithmic Scale (Power BI Report Builder)
- Specify an Axis Interval (Power BI Report Builder)
- Specify Consistent Colors across Multiple Shape Charts (Power BI Report Builder)
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for