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.
I am trying the get the previous status of ovens on the day before. Example.
How can I create the "Previous day status" collum?
Oven | Daily status | Day | Previous day status |
Oven 1 | Operating | 01/01/22 | |
Oven 2 | Operating | 01/01/22 | |
Oven 3 | Stop | 01/01/22 | |
Oven 1 | Stop | 01/02/22 | Operating |
Oven 2 | Operating | 01/02/22 | Operating |
Oven 3 | Stop | 01/02/22 | Stop |
Solved! Go to Solution.
@guilhermemedin1 , a new column
new column =
var _max = Maxx(filter(Table, Table[Oven] =earlier(Table[Oven]) && [Day] < earlier([Day])-1),[Day])
return
Maxx(filter(Table, Table[Oven] =earlier(Table[Oven]) && [Day] = _max),[status])
@guilhermemedin1 , a new column
new column =
var _max = Maxx(filter(Table, Table[Oven] =earlier(Table[Oven]) && [Day] < earlier([Day])-1),[Day])
return
Maxx(filter(Table, Table[Oven] =earlier(Table[Oven]) && [Day] = _max),[status])
Thanks a lot!
User | Count |
---|---|
28 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
33 | |
13 | |
12 | |
9 | |
7 |