# I'm stuck on counting the number of customers!

Hello Team,

I have another problem which has been difficult to resolve and I need your help!

I have created a measure that shows the 80/20 rule for sales and it works well.

The issue is that I would like to put a call out card stating the number of customers that the 80/20 rule has generated.

The problem is that when I use a card it counts all of our customers not just the 80/20 customers.

I have tried count rows but its not working so well.

Hello @dean.alley,

Thank You for posting your query onto the Forum.

You can try out the formulas given below to count the 20% of Customers that contribute to your 80% of the Sales -

`Total Customers = DISTINCTCOUNT( Sales[Customer ID] )`

``````No. of Top 20% - Customers =
VAR CustomerPercent = DISTINCTCOUNT( Sales[Customer ID] ) * 0.2

RETURN
CALCULATE( [Total Customers] ,
FILTER( VALUES( Sales[Customer ID] ),
RANKX( VALUES( Sales[Customer ID] ), [Total Sales], , DESC ) <= CustomerPercent ) )
``````

Below is the screenshot provided for the result -

Iâ€™m also attaching the PBIX file of my working for the reference.

Hoping you find this useful and helps you in your analysis.

Thanks & Warm Regards,
Harsh

The Pareto Principle (80-20) Rule.pbix (431.1 KB)

Hello Harsh,

Thank you for your help so far and sorry for the late reply!

What I would like to see is the number customers that actually make up the 80% of sales.

What Iâ€™m currently getting is the total number of customer for the region.

Hello @dean.alley,

From what I see is youâ€™ve just calculated the â€śTotal Customersâ€ť and not the subsequent part i.e. â€śNo. of Top 20% Customersâ€ť. In the above post, Iâ€™ve mentioned the formula to calculate this and have also attached the screenshot as well as the PBIX file for the reference.

When weâ€™ve only calculated the â€śTotal Salesâ€ť part and selected the slicer it will show the â€śOverall No. of Customersâ€ť available in that particular region. Below is the screenshot provided for the reference.

But once we calculate the â€śTotal Sales for Top 20% Customersâ€ť and â€śNo. of Top 20% Customersâ€ť the result shall look like this as per the screenshot provided below for the reference -

In the above screenshot, now youâ€™ll observe the difference that although the â€śTotal No. of Customerâ€ť
in that particular region is 336 but only 67 Customers contribute to the 80% of the Sales.

Again Iâ€™m providing the working of my PBIX file for the reference. Please go through this file.

Thanks & Warm Regards,
Harsh

The Pareto Principle (80-20) Rule.pbix (431.5 KB)

1 Like

Thank you for taking the time to assist me and my question Harsh.

1 Like

Hello @dean.alley,

Youâ€™re Welcome.