Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
12 | |
10 | |
6 |