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
Anonymous
Not applicable

How to Calculate FTE's! Correct monthly, but wrong total!

Hi!

 

I'm struggeling with a FTE (Full Time Employement) calculation. I get the correct monthly number, but the total is totally wrong. 

 

Here's my measure: 

 

FTE =
VAR maxdate =
MAX(Calendar_Live[Date])
VAR mindate =
MIN(Calendar_Live[Date])
Return
CALCULATE(SUMX(HR_data, HR_data[Employment_rate]),
FILTER(HR_data, HR_data[Hiredate]<=mindate &&(OR(HR_data[Enddate]>=maxdate,HR_data[Enddate]=0)) && HR_data[Employment_rate.]>0))
 
This messure will return this (correct by month, but what is going on with the Total?)
 
Anonym_Cons_0-1671178539089.png

 

The total should be the average of the year.

 

If anyone got a solution to this, please share ! 🙂

 

 
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi again! 

I think i solved this! I just changed the first "SUMX" to "AVERAGEX" like this:

FTE =
AVERAGEX (
    SUMMARIZE ( Calendar_Live, Calendar_Live[Year], Calendar_Live[Month] ),
    CALCULATE (
        VAR maxdate =
            MAX ( Calendar_Live[Date] )
        VAR mindate =
            MIN ( Calendar_Live[Date] )
        RETURN
            CALCULATE (
                SUMX ( HR_data, HR_data[Employment_rate] ),
                FILTER (
                    HR_data,
                    HR_data[Hiredate] <= mindate
                        && (
                            OR ( HR_data[Enddate] >= maxdate, HR_data[Enddate] = 0 )
                        )
                        && HR_data[Employment_rate.] > 0
                )
            )
    )

 

And the result now looks like this (just as I wanted): 

Anonym_Cons_2-1671213151560.png

 

Unless there is something that I've missed here, thank you so much for your help! 🙂

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi, thanks!

 

I tried to use this formula, but the first line :

 

SUMMARIZE ( HR_data, Calendar_Live[Year], Calendar_Live[Month] )

 

does not work, because the "Calendar_Live" is a different table than HR_data

@Anonymous

Ok, I got you. Please try

FTE =
SUMX (
    SUMMARIZE ( Calendar_Live, Calendar_Live[Year], Calendar_Live[Month] ),
    CALCULATE (
        VAR maxdate =
            MAX ( Calendar_Live[Date] )
        VAR mindate =
            MIN ( Calendar_Live[Date] )
        RETURN
            CALCULATE (
                SUMX ( HR_data, HR_data[Employment_rate] ),
                FILTER (
                    HR_data,
                    HR_data[Hiredate] <= mindate
                        && (
                            OR ( HR_data[Enddate] >= maxdate, HR_data[Enddate] = 0 )
                        )
                        && HR_data[Employment_rate.] > 0
                )
            )
    )
)
Anonymous
Not applicable

Hi, thanks again!

 

Now we are getting super close! :

Anonym_Cons_0-1671212629410.png

The only thing now is that the total is summing each month, but the total in this case should represent the yearly average FTE. Wanted result should be like this:

Anonym_Cons_1-1671212685379.png

Is this possible? 🙂

Anonymous
Not applicable

Hi again! 

I think i solved this! I just changed the first "SUMX" to "AVERAGEX" like this:

FTE =
AVERAGEX (
    SUMMARIZE ( Calendar_Live, Calendar_Live[Year], Calendar_Live[Month] ),
    CALCULATE (
        VAR maxdate =
            MAX ( Calendar_Live[Date] )
        VAR mindate =
            MIN ( Calendar_Live[Date] )
        RETURN
            CALCULATE (
                SUMX ( HR_data, HR_data[Employment_rate] ),
                FILTER (
                    HR_data,
                    HR_data[Hiredate] <= mindate
                        && (
                            OR ( HR_data[Enddate] >= maxdate, HR_data[Enddate] = 0 )
                        )
                        && HR_data[Employment_rate.] > 0
                )
            )
    )

 

And the result now looks like this (just as I wanted): 

Anonym_Cons_2-1671213151560.png

 

Unless there is something that I've missed here, thank you so much for your help! 🙂

tamerj1
Super User
Super User

Hi @Anonymous 
Please try

FTE =
SUMX (
    SUMMARIZE ( HR_data, Calendar_Live[Year], Calendar_Live[Month] ),
    CALCULATE (
        VAR maxdate =
            MAX ( Calendar_Live[Date] )
        VAR mindate =
            MIN ( Calendar_Live[Date] )
        RETURN
            CALCULATE (
                SUMX ( HR_data, HR_data[Employment_rate] ),
                FILTER (
                    HR_data,
                    HR_data[Hiredate] <= mindate
                        && (
                            OR ( HR_data[Enddate] >= maxdate, HR_data[Enddate] = 0 )
                        )
                        && HR_data[Employment_rate.] > 0
                )
            )
    )
)

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!

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.