How To Calculate Percentage Of Total In Power Bi

How to Calculate Percentage of Total in Power BI

Calculating the percentage of the total in Power BI is a common requirement when analyzing and visualizing data. Power BI provides several functions and techniques to achieve this calculation. Let’s go through the steps using an example:

Assume we have a dataset that contains sales data for different products. We want to calculate the percentage of each product’s sales to the total sales.

Step 1: Create a new measure.


Sales Percentage = DIVIDE(SUM([Sales]), CALCULATE(SUM([Sales]), ALL('Table')))

In this step, we use the DIVIDE function to divide the sum of sales for each product by the total sales. The CALCULATE function is used to evaluate the total sales for all products, ignoring any filters or slicers applied to the visual.

Step 2: Add a visual to display the sales percentage.

Now, you can add a visual, such as a column chart or a pie chart, to display the sales percentage. Use the “Sales Percentage” measure as the value or size in the visual, and add the “Product” field to the axis.

For example, if you use a column chart, each column will represent a product, and the height of the column will represent the percentage of sales for that product compared to the total sales.

By following these steps, you can easily calculate and visualize the percentage of total in Power BI. This technique can be applied to various scenarios to gain insights into your data.

Note: This example assumes you have basic knowledge of Power BI and are familiar with creating measures and visuals. It’s recommended to explore Power BI documentation and tutorials for a better understanding of the tool’s capabilities.

Leave a comment