BBampaa

Lessons › Power BI

Power BI lesson

Shares and percentages

Lagos brings in 64.4% of all revenue. Month by month, its share stays between 61% and 66%.

Try this lesson free →
About 5–10 minutes · no sign-up needed

Example

A share is the part divided by the whole. CALCULATE gives the part, and DIVIDE does the rest:

Lagos Share = DIVIDE([Lagos Revenue], [Total Revenue])

Key points

The partA CALCULATE measure: [Lagos Revenue].
The wholeThe total: [Total Revenue].
DIVIDE(part, whole)Part on top. Format it as a percentage.

Put together: DIVIDE([Lagos Revenue], [Total Revenue]) is Lagos's share.

In Power BI Desktop

Select the measure, then Measure tools, then the % button, so 0.64 shows as 64%.

Practice

Try each one in your head first, then open the answer.

1. Build the formula for Lagos's share of total revenue.
Lagos Share = DIVIDE([Lagos Revenue], [Total Revenue])
2. Write a measure for Lagos's share of total revenue.
Lagos Share = DIVIDE([Lagos Revenue], [Total Revenue])
3. Write a measure for the Audio category's share of total revenue.
Audio Share = DIVIDE([Audio Revenue], [Total Revenue])
4. Write a measure for Abuja's share of total revenue. There's no Abuja measure yet, so put a CALCULATE inside DIVIDE.
Abuja Share = DIVIDE(CALCULATE([Total Revenue], Sales[Store] = "Abuja"), [Total Revenue])

Learn it by doing. This lesson is a short hands-on level on Bampaa: see it work, then build and write it yourself, with instant feedback.

Try this lesson free →
About 5–10 minutes · no sign-up needed