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
k123
Frequent Visitor

How to divide a column value by a measure?

Hi,

 

I am trying to create some measures in power bi, where I want to divide each score by the sum of scores for each group

 

My data looks like following:

Capture-112.PNG

 

I created a meaure to get sum of scores by each group, the measure formula used:

 

Sum by Group = SUMX(VALUES('Table'[group]), CALCULATE( SUM('Table'[score])))

 

Now I want to create a measure to divide each score in the score column by its corresponding 'Sum by Group' .

 

Please let me know. Thanks!

 

 

1 ACCEPTED SOLUTION

@k123,

 

You may refer to the measure below.

Measure =
DIVIDE (
    SUM ( Table1[score] ),
    CALCULATE ( SUM ( Table1[score] ), ALLSELECTED ( Table1[category] ) )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

you can try

 

divide(SUM ( Table1[score]),calculate(SUM ( Table1[score]),ALLEXCEPT(TABLE1,Table1[category])))

Anonymous
Not applicable

I'm thinking you're looking for a result like this, comparing each value to the total value of that group. You can leverage ALL and EARLIER to get the right context:

 

Percentage of Group Total = 
DIVIDE(Data[Score],
CALCULATE(
    SUM(Data[Score]),
    FILTER(Data, Data[Group] = EARLIER(Data[Group]))), 0)

 

 

image.png

@Anonymous Is there a way to create a measure instead of a column, like in your solution?

@k123,

 

You may refer to the measure below.

Measure =
DIVIDE (
    SUM ( Table1[score] ),
    CALCULATE ( SUM ( Table1[score] ), ALLSELECTED ( Table1[category] ) )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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