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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
adnanarain
Helper V
Helper V

Measure Performance Issue

Please see below measure, i am trying to calculate number of customers with 80% sales. I am getting correct result but measure responding very slow almost takes 40 seconds to refresh 3 month data. I am using calculated customer table as i dont have the separate customer table in model.

 

 

Customer 80% = 
VAR totalsales = [Sales]
VAR vtable = 
        SUMMARIZE(
        Customer,
        Customer[CustomerN], 
        "vRanking",RANKX(ALLSELECTED(Customer),[Sales],,DESC),
        "vSales",[Sales])
VAR vtable2 = ADDCOLUMNS(vtable,
        "v2CumSales",SUMX(FILTER(vtable,EARLIER([vRanking])>=[vRanking]),[vSales]))
    RETURN 
Countx(
    FILTER(vtable2,[v2CumSales]<=totalsales*0.80),
    [vSales]
)

 

 

2 REPLIES 2
amitchandak
Super User
Super User

@adnanarain , refer if window function and measure can help

Power BI Window: Pareto Analysis Again, 80% of sales, Order by Measure when REL position is used: https://youtu.be/GpoITi_tRIw

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I treid your soultion but it is also slow and giving error "Visual has Exceed available resources" , I have 29K customers so i want to calculate no of customers who contribute 80% of sales, Sales, cost, profit and profit % for the same. Actually i want the ABC analysis.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.