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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Percentage DESC count Until 80% flagging a Column

I worked with the Power BI community to solve a difficult problem I had about using RANK measure and running total . (https://community.powerbi.com/t5/Desktop/Percentage-DESC-count-Until-80/m-p/1580296/thread-id/642184...)

I used the measures below to count percent running total. The problem I am now having with the measure is that my data is way too big. I keep receiving an error “Resources Exceeded”. Is there a way to flag the records that only contain the count percent running total as a column? This will give me just the data I need to crate a table or a visual without any errors.

 

//let rank the percent measure
Percent Rank = RANKX ( ALL ( 'Table' ), [Percent], , DESC ) 

//get the running total of percent based on rank, highest to lowest
Percent Running Total = 
VAR __rank = [Percent Rank]
RETURN
SUMX (  FILTER ( ALL ( 'Table' ), [Percent Rank] <= __rank ), [Percent] ) 

//final measure to count rows that are below threshold in this case 0.8 or 80%

Row Count Below Threshold = 
VAR __countBelowPercent = 0.8 --store threshold percentabge
RETURN 
COUNTX ( 
    'Table', 
    IF ( [Percent Running Total] <= __countBelowPercent, 1 ) 
) 
4 REPLIES 4
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

Creating calculated columns or tables consumes far more resources than creating measure.

Maybe you could try to modify the  DAX for performance of measure.

https://maqsoftware.com/expertise/powerbi/dax-best-practices 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Think you should check percentile

 

https://blog.enterprisedna.co/implementing-80-20-logic-in-your-power-bi-analysis/
https://forum.enterprisedna.co/t/testing-the-pareto-principle-80-20-rule-in-power-bi-w-dax/459

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

Hi @amitchandak

 

Thank you for the links. I am interested in this part of the link. As you can see the screenshot I took below. In this case, what would be the "Unique Customers"?

 

Yekalo23_0-1610466053323.png

 

Anonymous
Not applicable

@amitchandak I was able to find "Unique Customers" but did not really answer what I was looking for. I just need to add a column that flags top 80%. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.