Forum Discussion
Annemie19
6 years agoHelper II
Select Next date in column
Hi There, I want to create a measure which gives the next date in the column for the entityID in that row. For instance, in the table below, I want a new column which, let's say entity ID 92 the...
- 6 years ago
Annemie19 You can use this:
Column = VAR CurrentRowEntity = Anne[EntityID] VAR CurrentRowDate = Anne[MeasurementDate] VAR SameRows = FILTER ( Anne, Anne[EntityID] = CurrentRowEntity && Anne[MeasurementDate] > CurrentRowDate ) VAR Result = MINX ( SameRows, Anne[MeasurementDate] ) RETURN IF ( Result = BLANK (), CurrentRowDate, Result )
AntrikshSharma
6 years agoCommunity Champion
Annemie19 You can use this:
Column =
VAR CurrentRowEntity = Anne[EntityID]
VAR CurrentRowDate = Anne[MeasurementDate]
VAR SameRows =
FILTER (
Anne,
Anne[EntityID] = CurrentRowEntity
&& Anne[MeasurementDate] > CurrentRowDate
)
VAR Result =
MINX ( SameRows, Anne[MeasurementDate] )
RETURN
IF ( Result = BLANK (), CurrentRowDate, Result )