The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
24 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
29 | |
13 | |
11 | |
10 | |
9 |