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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Quantity of persons that generate the 80% of the revenue

Hello everyone,
Im trying to build a measure that gives me the ammount of employees that return the 80% of the revenue.
As an example, I have the following data:

id_persontotal_income
23$ 10.903
134$ 9.819
418$ 9.521
247$ 9.016
211$ 8.614
388$ 8.570
327$ 8.541
333$ 8.307
49$ 8.290
17$ 8.246


The total revenue in this case is $89827 an its 80% = $71861
With this ammount of data I get to the 80% of revenue with 80% of the employees, but with enought data I should get different results.

What do you think?

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Anonymous 

is this what you want?

create column 

rank = RANKX('Table','Table'[total_income],,DESC)
Column = sumx(FILTER('Table','Table'[rank]<=EARLIER('Table'[rank])),'Table'[total_income])/sum('Table'[total_income])

create a measure

Measure = 
CALCULATE(DISTINCTCOUNT('Table'[id_person]),FILTER('Table','Table'[Column]<0.8))+1

1.PNG

or create measure

income = sum('Table'[total_income])
rank2 = RANKX(ALL('Table'[id_person]),[income],,ASC)
portion = [income]/CALCULATE([income],ALL('Table'))
percentage = 
VAR _rank=[rank2]
RETURN CALCULATE([portion],FILTER(ALL('Table'[id_person]),'Table'[rank2]>=_rank))
Measure 3 = if([percentage]<0.8,1,0)
Measure 4 = sumx(VALUES('Table'[id_person]),[Measure 3])+1

please see the attachment below

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
ryan_mayu
Super User
Super User

@Anonymous 

is this what you want?

create column 

rank = RANKX('Table','Table'[total_income],,DESC)
Column = sumx(FILTER('Table','Table'[rank]<=EARLIER('Table'[rank])),'Table'[total_income])/sum('Table'[total_income])

create a measure

Measure = 
CALCULATE(DISTINCTCOUNT('Table'[id_person]),FILTER('Table','Table'[Column]<0.8))+1

1.PNG

or create measure

income = sum('Table'[total_income])
rank2 = RANKX(ALL('Table'[id_person]),[income],,ASC)
portion = [income]/CALCULATE([income],ALL('Table'))
percentage = 
VAR _rank=[rank2]
RETURN CALCULATE([portion],FILTER(ALL('Table'[id_person]),'Table'[rank2]>=_rank))
Measure 3 = if([percentage]<0.8,1,0)
Measure 4 = sumx(VALUES('Table'[id_person]),[Measure 3])+1

please see the attachment below

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

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.