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
EAFN
New Member

How to calculate a percentage if it is related to another value

Hi everyone, I'm new to power BI and need some help with a problem. We receive different items quantities that come in different containers and I need to create a column/measure that tells me how much of the container is occupied by each item. This is an example of the data, we have the "ITEM", "QUANTITY" and "CONTAINER" columns, the "RESULT" column is the one that I need to create, thank you for your help.

ITEMQUANTITYCONTAINERRESULT
A9AAA0,600
B4AAA0,267
C2AAA0,133
D6AAB1
1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@EAFN 

pls try this

Column = DIVIDE('Table'[QUANTITY],CALCULATE(sum('Table'[QUANTITY]),ALLEXCEPT('Table','Table'[CONTAINER])))

1.PNG

if you want to create a measure ,pls try this

Measure = DIVIDE(sum('Table'[QUANTITY]),CALCULATE(sum('Table'[QUANTITY]),ALLEXCEPT('Table','Table'[CONTAINER])))

2.PNG





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

Proud to be a Super User!




View solution in original post

3 REPLIES 3
ryan_mayu
Super User
Super User

@EAFN 

pls try this

Column = DIVIDE('Table'[QUANTITY],CALCULATE(sum('Table'[QUANTITY]),ALLEXCEPT('Table','Table'[CONTAINER])))

1.PNG

if you want to create a measure ,pls try this

Measure = DIVIDE(sum('Table'[QUANTITY]),CALCULATE(sum('Table'[QUANTITY]),ALLEXCEPT('Table','Table'[CONTAINER])))

2.PNG





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

Proud to be a Super User!




Thank you, the measure worked for me.

you are welcome





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

Proud to be a Super User!




Helpful resources

Announcements
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!

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.

Top Solution Authors