Forum Discussion
SLima
Helper I
4 years agoPrevious line
Get previous value.
- 4 years ago
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!!
VahidDM
Super User
4 years agoHi 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!!