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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
kirawaters
Frequent Visitor

Calculate percentage of same group

Hello, I'm trying to figure out how to calculate the percentage of the same group using a measure. If I can't do it in a measure, I at least need to be able to do it in a column on the same table. If my data were split between two tables, I would use PercentageofItem = thistable[sold]/sumx(filter(thattable, thattable[item#]=thistable[item#]. 

Below is an image of what I'm trying to do: my table has products, and the number of those products sold by which salesperson. I need to know for each line what percentage of sales it is for it's type of product. My dataset includes thousands of products and thousands of people, so I don't want to see it the way the summary shows it, just on a line-by-line basis how much of the total of that type of product is this line referring to? I want the solutions in row D that can be found using the excel formula there.

kirawaters_0-1630622617385.png

 

2 REPLIES 2
amitchandak
Super User
Super User

@kirawaters , Try a measure like

divide(sum(thistable[sold])/calculate(sum(thistable[sold]) , filter(allselected(thattable), thattable[item#]=max(thistable[item#] ))))

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

That's an interesting solution. The problem is that thattable doesn't exist. Everything is on thistable. Is there a way to do it with all of the relevant data being on a single table?

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.