Forum Discussion
Get the most recent status
- 1 year ago
That is the step one measure, which steps towards the solution. At the end of the blog there are two other version
This was one of them
// Using TOPN
VAR currentState = SELECTEDVALUE(States[State])
VAR currentDate = SELECTEDVALUE('Calendar'[Date])+1
RETURN
COUNTROWS(
FILTER(
ALL( data[TestID] ),
SELECTCOLUMNS(
TOPN(
1,
CALCULATETABLE(
FILTER(
'data',
[DateTime] < currentDate
)
,REMOVEFILTERS('Calendar'[Date])
,REMOVEFILTERS('States'[State])
),
'data'[DateTime],
DESC
),
"Last Value", [State]
)
= currentState
)
)
Hi,
PBI file attached.
Hope this helps.