Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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!!
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!!
@SLima you would need a row identifier in the dataset
Column =
VAR _0 =
CALCULATE ( MAX ( 'Table'[RowIdentifier] ) )
VAR _1 =
CALCULATE (
MAX ( 'Table'[Column2] ),
FILTER ( ALL ( 'Table' ), 'Table'[RowIdentifier] = _0 - 1 )
)
RETURN
_1
User | Count |
---|---|
18 | |
18 | |
14 | |
13 | |
13 |
User | Count |
---|---|
17 | |
14 | |
14 | |
10 | |
8 |