# How to Calculate Percent of Total in Power BI?

Are you looking at Power BI percent of total measure? If your requirement is yes, we can achieve this with the help of some measure calculation.

In this Power BI tutorial, we will learn how to calculate percent of total in Power BI.

## How to Calculate Percent of Total in Power BI

Now, we will see how to calculate the percentage of the total in Power BI measure.

Here, I have a SharePoint list (Finacial Sample) that contains below columns with various data types:

1. Open Power BI Desktop and load the data. Then, you see data in the Data pane.

2. Under the Home tab, click on New measure.

3. In the formula bar put the below expression. Then click commit.

``Total Sales = SUM('Financial Sample'[ Sales])``

Where:

• Total Sales = Name of the Measure
• SUM = DAX Function
• Financial Sample = Name of the Table
• Sales = Name of the Column

4. Under the Home tab, expand Visual gallery(black box) -> Click the Table visual.

5. Then, using the +Add data option, add Product and Total Sales into the Columns field.

We will create a new measure called All Sales to remove filters from the Product column. To do this, follow the below steps:

6. Under the Home tab, click on New measure.

7. In the formula bar put the below expression. Then click commit.

``All Sales = CALCULATE([Total Sales],ALL('Financial Sample'[Product]))``

Where:

• All Sales = Name of the New Measure
• CALCULATE = DAX Function
• Total Sales = Name of the Measure
• ALL = DAX Function
• Financial Sample = Name of the Table
• Product = Name of the Column

To calculate the percent of the total, we’ll create a new measure called “% of Total,” which utilizes the DIVIDE function to divide “Total Sales” by “All Sales,” with a zero as the optional alternate result. To do this, follow the below steps:

8. Under the Home tab, click on New measure.

9. In the formula bar put the below expression. Then click commit.

``% of total = DIVIDE([Total Sales],[All Sales],0)``

Where:

• % of total = Name of the New Measure
• DIVIDE = DAX Function
• Total Sales = Name of the Measure
• All Sales = Name of the Measure

10. Now, change the format to show percentages. To do this, Select % of the total, and under Measure tools, click the ‘%‘ icon.

11. Then, using the +Add data option, add % of total into the Column field in the Power BI table visual.

12. After that, see the percentage total in the Power BI table visual.

This way, you can calculate the percentage of the total in Power BI measure.

## Conclusion

Now, you have a basic understanding of calculating percentages in Power BI. This tutorial taught us how to calculate the percentage of the total in a Power BI measure using a simple scenario.

Moreover, you may like some more Power BI tutorials: