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
BrianNeedsHelp
Resolver I
Resolver I

DAX Summarize By Employee With Formula

I have a table like this that computes the Quota Impact by this formula.  ([Quota]/([Days in Month]*8))*[Hours Closed].  It works fine when all the rows of the table are selected in the Visual.  However I'm trying to group this by Employee, but it sums the Quota Amount for each location and then computes, which is expected, but I'm not certain how to calculate it something like [Quota] divided by Count by Location given there could be an entry in two different months .   Summary it should look like this Bob =44/248 * 16:  
Emp  Quota Impact      
Bob    2.82

Suzy   1.04

 

Instead I get :  Bob=88/248 * 16:

Emp  Quota Impact
Bob    5.67 

Suzy   2.08

 

LocationQuotaDateHours ClosedEmpQuotaImpact
Location A 449/1/20248Bob1.41
Location A 449/1/29248Bob1.41
Location B 129/1/20248Suzy0.38
Location C 139/1/20248Suzy0.41
Location C 1610/1/20244Suzy0.25
1 ACCEPTED SOLUTION
aeagleton-coop
New Member

Quota Impact =

VAR Granularity =
SUMMARIZE(
    InputTable,
    InputTable[Emp],
    InputTable[Location],
    InputTable[Date],
    InputTable[Quota]
)

RETURN
SUMX(
    Granularity,
    VAR HoursClosed = CALCULATE(SUM(InputTable[Hours Closed]))
    VAR DaysInMonth = 31  /* DAY(EOMONTH([Date], 0)) */
    RETURN [Quota] / (DaysInMonth * 8) * HoursClosed    
)

View solution in original post

2 REPLIES 2
aeagleton-coop
New Member

Quota Impact =

VAR Granularity =
SUMMARIZE(
    InputTable,
    InputTable[Emp],
    InputTable[Location],
    InputTable[Date],
    InputTable[Quota]
)

RETURN
SUMX(
    Granularity,
    VAR HoursClosed = CALCULATE(SUM(InputTable[Hours Closed]))
    VAR DaysInMonth = 31  /* DAY(EOMONTH([Date], 0)) */
    RETURN [Quota] / (DaysInMonth * 8) * HoursClosed    
)
BrianNeedsHelp
Resolver I
Resolver I

Works Beautiful!   

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric 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.

Users online (26)