Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello there,
I need a calculated column "Result" to be filled up with the immediate previous row value as shown below.
Any suggestions please? PS: Do not want this to be a measure value, so may be this could be returned as a table output which can act like a temporary table. There are additional calculations lined up on top of this output.
| ID | Date | Rank | Result ( Immediate Previous Date based on Rank for each ID) |
| 1 | 01/01/2021 | 2 | |
| 1 | 02/01/2021 | 1 | 01/01/2021 |
| 2 | 01/01/2021 | 3 | |
| 2 | 03/01/2021 | 2 | 01/01/2021 |
| 2 | 05/01/2021 | 1 | 03/01/2021 |
Thanks,
Pravallika
Solved! Go to Solution.
@Anonymous
Add the following calculated column to your table:
Result =
var __currentrank = Table11[Rank]
var __currentid = Table11[ID]
var result =
MAXX(
FILTER( Table11 , Table11[ID] = __currentid && Table11[Rank] = __currentrank + 1 ),
Table11[Date]
)
return
result
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Anonymous
Add the following calculated column to your table:
Result =
var __currentrank = Table11[Rank]
var __currentid = Table11[ID]
var result =
MAXX(
FILTER( Table11 , Table11[ID] = __currentid && Table11[Rank] = __currentrank + 1 ),
Table11[Date]
)
return
result
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |