Forum Discussion
SLima
Helper I
4 years agoPrevious line
Get previous value.
Hi SLima
Try this code to add a new column:
Calculada = VAR _A = CALCULATE ( MAX ( 'Table'[Coluna 1] ), FILTER ( ALL ( 'Table' ), 'Table'[Coluna 1] < EARLIER ( 'Table'[Coluna 1] ) ) ) RETURN CALCULATE ( MAX ( 'Table'[Coluna 2] ), FILTER ( ALL ( 'Table' ), 'Table'[Coluna 1] = _A ) )output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
2 Replies
- VahidDM
Super User
Hi SLima
Try this code to add a new column:
Calculada = VAR _A = CALCULATE ( MAX ( 'Table'[Coluna 1] ), FILTER ( ALL ( 'Table' ), 'Table'[Coluna 1] < EARLIER ( 'Table'[Coluna 1] ) ) ) RETURN CALCULATE ( MAX ( 'Table'[Coluna 2] ), FILTER ( ALL ( 'Table' ), 'Table'[Coluna 1] = _A ) )output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!