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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
JbPa33
Helper I
Helper I

Sum of a Measure

Hello,

 

I'm working on Power BI and I am meeting a problem. I created a first measure which calculate the sum of sales by partner : 

JbPa33_0-1691133295924.png

In this table, I display the top ten of my partners, the total of sale is 100M€. I would like create a second measure which calculate the part of a partner in the total sale (A1 : 6,228,028/100,000,000 = 6.2%). But I don't know howw create a measure which calculate the total sum of sales.

 

Thank you for your help.

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @JbPa33 
Use  Calculate and ALL dax functions to remove filters from your partner.

something like :

percent from total = divide (sum('Table'[value]),
calculate (sum('Table'[value]), all('Table'[Partner Sale])))
Ritaf1983_0-1691260833042.png

All - removes all the filters from the partners including "top n" that you using so it will calculate the percent from the grand total as you need.

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Assuming sale is a measure, write these measures

Sale of top 10 partners = SUMX(TOPN(10,all(Data[partners),[sale],desc),[sale])

Contribution (%) = divide([sale],[Sale of top 10 partners])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ritaf1983
Super User
Super User

Hi @JbPa33 
Use  Calculate and ALL dax functions to remove filters from your partner.

something like :

percent from total = divide (sum('Table'[value]),
calculate (sum('Table'[value]), all('Table'[Partner Sale])))
Ritaf1983_0-1691260833042.png

All - removes all the filters from the partners including "top n" that you using so it will calculate the percent from the grand total as you need.

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors