How to add subtotals in Power BI table
Adding subtotals in a table in Power BI is a useful way to summarize and analyze your data by groups or categories. Here’s a step-by-step guide with examples:
- Open your Power BI report or create a new one.
- Drag and drop a table visual onto the report canvas.
- Add the desired fields to the table visual by dragging them from the Fields pane to the visual.
- In the Fields pane, locate the field you want to add subtotals for and click on the small drop-down arrow next to it.
- From the drop-down menu, select “Subtotals” > “Show” to display subtotals for the selected field.
- Power BI will automatically add subtotals to the table visual based on the chosen field. You can customize the appearance of the subtotals by formatting the table.
Let’s consider an example to better understand how to add subtotals in Power BI:
Suppose you have a table visual with the following fields: “Category”, “Product”, and “Sales Amount”. You want to add subtotals for the “Sales Amount” field based on the “Category”.
- Drag the “Category” field to the Rows area of the table visual.
- Drag the “Product” field to the Rows area beneath the “Category” field.
- Drag the “Sales Amount” field to the Values area of the table visual.
- Click on the drop-down arrow next to “Sales Amount” in the Fields pane.
- Select “Subtotals” > “Show” to enable subtotals for the “Sales Amount” field.
After performing the above steps, the table visual will display subtotals for the “Sales Amount” field based on each category and product combination. You can further customize the table visual by changing the subtotal formatting, sorting, and other properties.
By following these steps, you can easily add subtotals to any field in a Power BI table visual, allowing you to organize and analyze your data more efficiently.