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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JB_AT
Helper III
Helper III

Calculating correct FTE

Good morning

I have a table with employee information. It shows a changes in employee data. I have a ValidFrom and ValidTo column, which indicates that something changed in their record.

 

It can happen that their FTE changes within a month timframe, example from 0,5 to 1.

 

I have a RunningTotal measure which technically works, but gives the wrong result if there is such a case like above. What I would like to achieve is to get the latest value. Ideally, this would change on the selected time frame, for example, if 2023 is selected in the date dlicer and all months are selected, then the latest value is shown, same for quarter, month etc...

Below is my current Running Total Measure. Which would show a combined value if there were multiple changes in a timeframe

FTE RT Test = 
/// Employees Amounts Over Time ///
VAR MaxDate =
    MAX ( DIM_Date[Date] )
RETURN
    CALCULATE (
        [Test FTE],
        KEEPFILTERS (
            'Emp History'[__VALID_FROM] <= MaxDate
                && 'Emp History'[__VALID_UNTIL] >= MaxDate
                && NOT ( CONTAINSSTRING ( 'Emp History'[JobProfil], "Trainee" ) )
        ),
        ALL ( DIM_Date ),
    USERELATIONSHIP(DIM_Date[Date], 'Emp History'[__VALID_FROM]))

 Thanks

1 ACCEPTED SOLUTION
JB_AT
Helper III
Helper III

I adapted the [Test FTE] to show the last value and it works as expected

Test FTE = CALCULATE ( 
        LASTNONBLANK ( 'Emp History'[FTE], 1 ))

View solution in original post

1 REPLY 1
JB_AT
Helper III
Helper III

I adapted the [Test FTE] to show the last value and it works as expected

Test FTE = CALCULATE ( 
        LASTNONBLANK ( 'Emp History'[FTE], 1 ))

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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