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

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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