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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Divide sum of values by single group value

Hello,

 

I have a table where one of the columns qty is shown as the full Phase code qty and not the single line item.

 

For example in the table below the period qty is 45 for the full phase code 12345 not 90. The hours are shown on the individual row/category level however. 

 

What I need is to find a way to divide the sum of the hours (2300) by the group period quantity (45).

 

Phase CodeCategoryPeriod QtyPeriod HoursExpected Hours/QTY
123450145180051.1
12345024550051.1



I'm a bit stuck - does anyone have advice for a good way to do this?

 

Thanks in advance!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try a measure like

 

divide(sum(Table[Period Hours]), sumx(summarize(Table, Table[Phase Code], Table[Period Qty]),[Period Qty]))

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Thank you @amitchandak I'll try that out!

Anonymous
Not applicable

HI @Anonymous,

DId amitchandak 's suggestion help for your scenario? If that is the case, you can consider Kudo or accept his suggestions to help others who faced similar requirements to find this more quickly.

If not help, please share some more detailed information to help us clarify your requirements.

How to Get Your Question Answered Quickly

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@Anonymous , Try a measure like

 

divide(sum(Table[Period Hours]), sumx(summarize(Table, Table[Phase Code], Table[Period Qty]),[Period Qty]))

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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