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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
pbijess857
Frequent Visitor

Multiply Sum with Average

Hello. I am trying to figure out how to get this to work in Power BI.  The rows on my table represent tickets with a number value (hours of work.) This table is joined with a separate table that contains some additional information about the tickets from a different database, including the hours available for each team.  I'm trying to sum up the hours of work associated with each ticket and divide by the time each team has available.  I'm able to represent the sum of hours of work and the average hours available in a table, but riding the struggle bus trying to use them in additional calculations. 

 

The underlying data would look something like this: 

pbijess857_0-1639614043673.png

 

I think the next step is to get the data summarized by team which would ideally look something like this:  (this is where I'm stuck)

pbijess857_1-1639614091190.png

 

And the end goal would be to sum up the average hours available by team (and sum of hours of work) to get a final utilization percentage. 

pbijess857_2-1639614152919.png

 

Any help would be appreciated. I can't seem to find the right solution thus far. 

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @pbijess857 

Try this code to add a new table:

calctables_formulabarempty

 

Table 2 =
VAR _A =
    ADDCOLUMNS (
        SUMMARIZE (
            'Table',
            'Table'[Group],
            'Table'[Team],
            "SUM Hours of Works", SUM ( 'Table'[Hours of Work] ),
            "AVG Hours Available", AVERAGE ( 'Table'[Team Hours Available] )
        ),
        "Sum Points / AVG Capacity", [SUM Hours of Works] / [AVG Hours Available]
    )
RETURN
    ADDCOLUMNS (
        GROUPBY (
            _A,
            [Group],
            "SUM Hours of Works", SUMX ( CURRENTGROUP (), [SUM Hours of Works] ),
            "SUM AVG Hours Available", SUMX ( CURRENTGROUP (), [AVG Hours Available] )
        ),
        "Work/Available", [SUM Hours of Works] / [SUM AVG Hours Available]
    )

 

output:

VahidDM_0-1639615979263.png

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

View solution in original post

2 REPLIES 2
VahidDM
Super User
Super User

Hi @pbijess857 

Try this code to add a new table:

calctables_formulabarempty

 

Table 2 =
VAR _A =
    ADDCOLUMNS (
        SUMMARIZE (
            'Table',
            'Table'[Group],
            'Table'[Team],
            "SUM Hours of Works", SUM ( 'Table'[Hours of Work] ),
            "AVG Hours Available", AVERAGE ( 'Table'[Team Hours Available] )
        ),
        "Sum Points / AVG Capacity", [SUM Hours of Works] / [AVG Hours Available]
    )
RETURN
    ADDCOLUMNS (
        GROUPBY (
            _A,
            [Group],
            "SUM Hours of Works", SUMX ( CURRENTGROUP (), [SUM Hours of Works] ),
            "SUM AVG Hours Available", SUMX ( CURRENTGROUP (), [AVG Hours Available] )
        ),
        "Work/Available", [SUM Hours of Works] / [SUM AVG Hours Available]
    )

 

output:

VahidDM_0-1639615979263.png

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

This looks like it has me back on the right track. Thank you for the help! 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.