Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Solved! Go to Solution.
I adapted the [Test FTE] to show the last value and it works as expected
Test FTE = CALCULATE (
LASTNONBLANK ( 'Emp History'[FTE], 1 ))
I adapted the [Test FTE] to show the last value and it works as expected
Test FTE = CALCULATE (
LASTNONBLANK ( 'Emp History'[FTE], 1 ))
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |