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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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]))

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Thank you @amitchandak I'll try that out!

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
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]))

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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