Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
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
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 62 | |
| 62 | |
| 42 | |
| 21 | |
| 18 |