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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
GoingIncognito
Advocate III
Advocate III

Creating a measure that scales the sum to 100%

I've table "Basket constitution" that has the weights of differend indices. Weight is an integer. Now, how do I create a measure that scales to 100% for any subset of these weights? E.g. a basket with weights 3+3+5 and 6+10+15 would both scale to 100%? I'm guessing I'd use the function allselected? image.png

2 REPLIES 2
Anonymous
Not applicable

Hi @GoingIncognito ,

 

I'm not sure if i understand you correctly, are you meaning 3,3,5 belong to same category and 6,10,15 belong to another same category and you want to calculate the percentage about each value for each category, like 3/(3+3+5)?

 

Best Regards,

Jay

Community Support Team _ Jay Wang

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

GoingIncognito
Advocate III
Advocate III

Maybe I figured this finally out?
Is this correct:

_weight =
var _sum= SUM('Basket constitution'[WEIGHT])
var _whole= CALCULATE( SUM('Basket constitution'[WEIGHT]), ALLSELECTED(table2*) )
return
DIVIDE( _sum, _whole)
*=table2 is the table that provides the row values for the graph I'm trying to build
 
And now if I need to use table3 instead of table2 in my graph, how do I incorporate treatas() ?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors