Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
abdulmannan1991
Helper II
Helper II

Pareto - Distinct Count of Top 80% Vendors

Hello. I am working on a Pareto (80/20) Analysis. I have got a table which contains Supplier names and Spend values in columns. To calculate cumulative sum, I have used the following Measure:

 

 

 

Measure (Cumulative Spend) = 
VAR TotalRevenue = CALCULATE(SUM('MyTable'[Spend]),ALLSELECTED('MyTable'))
VAR CurrentRevenue = SUM('MyTable'[Spend])
VAR SummarizedTable =
SUMMARIZE(
    ALLSELECTED('MyTable'),
    'MyTable'[Supplier],
    "Revenue",SUM('MyTable'[Spend])
)
VAR CumulativeSum =
SUMX(
    FILTER(SummarizedTable,[Revenue] >= CurrentRevenue),
    [Revenue]
)
RETURN
DIVIDE(CumulativeSum,TotalRevenue)

 

 

 

Above measure is working perfect and it gives me the % cumulative spend by supplier - sorted High to Low by spend values.

 

Now I want to calculate the distinct count of suppliers which account for top 80% of the spend.

For example,

SupplierSpendCumulative Spend (using above Measure)
A50036%
B25054%
C20068%
D20082%
E15093%
F100100%

As per the above table, cumulative spend exceeds 80% in 5th row. So, I need to have a visual/card to show how many suppliers account for that top 80% of the spend. (For above example, the answer should be 5 suppliers).
Also, the calculation should be dynamic ... that is, the DAX should work even if another filter is applied on the data. (For example, if there's another field "Countries" in the data and I filter for any particular country, the supplier count for top 80% should be recalculated based on that country ... and not the overall data).

Thank you.

2 REPLIES 2

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.