Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hi all,
I have a table like this:
Boat Date Status
A 15/07/2020 2
A 16/07/2020 1
A 17/07/2020 2
B 15/07/2020 1
B 16/07/2020 2
B 17/07/2020 1
How can I add a new calculated column showing in each row the status of the same boat in the previous day, showing as follows:
Boat Date Status Status Day Before
A 15/07/2020 2 -
A 16/07/2020 1 2
A 17/07/2020 2 1
B 15/07/2020 1 -
B 16/07/2020 2 1
B 17/07/2020 1 2
Thanks!
Solved! Go to Solution.
@planning - Try:
Status Day Before =
VAR __DayBefore = MAXX(FILTER('Table',[Date] = EARLIER('Table'[Date]) - 1 && [Boat] = EARLIER('Table'[Boat])),[Status])
RETURN
__DayBefore
@planning - Try:
Status Day Before =
VAR __DayBefore = MAXX(FILTER('Table',[Date] = EARLIER('Table'[Date]) - 1 && [Boat] = EARLIER('Table'[Boat])),[Status])
RETURN
__DayBefore
@planning , As new column
//continous day
Last day value = maxx(filter(Table, [date] = earlier([date]) -1 && [Boat] = earlier([Boat])),[Status])
// noncontinous day
Last day value =
var _max = maxx(filter(Table, [date] < earlier([date]) && [Boat] = earlier([Boat])),[date])
return
maxx(filter(Table, [date] = _max && [Boat] = earlier([Boat])),[Status])
for measure for same case find measure here
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 42 | |
| 40 | |
| 21 | |
| 20 |
| User | Count |
|---|---|
| 142 | |
| 105 | |
| 63 | |
| 36 | |
| 35 |