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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
SMITTY_8000408
Regular Visitor

Dynamic Pareto segmentation

Hi - Firstly if this post is answered elsewhere please let know 🙂

 

Example raw data:

 

Warehouse CodeWarehouse NameCustomer CodeCustomer DescriptionStock CodeSales $ USDQuantity
53WarehouseA884800CustomerAProd214.161
53WarehouseA884800CustomerAProd319.052281
53WarehouseA884800CustomerAProd517.71
53WarehouseA884800CustomerAProd67.081
53WarehouseA884800CustomerAProd77.081
53WarehouseA884800CustomerAProd810.621
53WarehouseA884800CustomerAProd917.71
53WarehouseA884800CustomerAProd12110.971921
53WarehouseA884800CustomerAProd1532.136121
53WarehouseA884800CustomerAProd1990.645241
53WarehouseA884801CustomerBProd420.121361
53WarehouseA884801CustomerBProd1891.79221
53WarehouseA884854CustomerCProd225.041961
53WarehouseA884960CustomerDProd619.632841
11WarehouseB320626CustomerEProd1640.384321
11WarehouseB365476CustomerFProd1332.136121
12WarehouseC344305CustomerGProd1440.384321
12WarehouseC370200CustomerHProd328.581961
12WarehouseC383250CustomerIProd420.928481
12WarehouseC383250CustomerIProd1056.094841
12WarehouseC383250CustomerIProd1156.413441
12WarehouseC383250CustomerIProd1754.44521
14WarehouseD315336CustomerJProd116.03621

 

I am trying to summarize my data in a sales by customer/product table like the one below. essentially a summarised 'Pareto' view of my sales data by customer and product.

 

  Products 
  AB
CustomersA7172016280
 B162805830
    
Total Sales110000 

 

I've created a summary 'Customer Code' and 'Product Code' table, and I've managed to create a dynamic set of measures that performs the A/B classification based on the running total, but at the moment I can only generate the calculations if I build them into a report view like the one below:image.png

 

 

 

Current Measure calcs:

 

1. Sum_Sales = SUMX('YTD Quad Data Source',SUM([Sales $ USD]))

2. Rank = RANKX(ALL('Customer Code'[Cust_Code]),[Sum_Sales])

3. Running_Sales = CALCULATE([Sum_Sales],TOPN([Rank],ALL('Customer Code'[Cust_Code]),[Sum_Sales]))

4. Pareto% = DIVIDE([Running_Sales],CALCULATE([Sum_Sales],'Customer Code'[Cust_Code]))

5. CustAB = IF([Pareto%]<=0.8,"A","B")

 

My question is - Is there any way to perform these calculations and have the resulting AB ranking defined as a dimension I can group and then change dynamically based on a selected customer or product slicer?

 

Hopefully I've explained myself well enough for you all to understand the problem 🙂

 

Thanks in advance for your assistance

 

Craig

0 REPLIES 0

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.