Percentage of total calculation

Now, create another calculated measure on the Internet Sales table using the following code. Make sure that you format the measure as a percentage:

% of All Countries = DIVIDE([Total Sales], [Total Sales all Countries])

In the following screenshot, you can see the completed example with both of the new measures created in this section. Without a basic understanding of the CALCULATE function, this type of percent of total calculation would be nearly impossible:

Figure 16- Completed example with both of the new measures

Get Microsoft Power BI Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.