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!
Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.
User | Count |
---|---|
101 | |
66 | |
40 | |
39 | |
38 |
User | Count |
---|---|
108 | |
53 | |
51 | |
48 | |
44 |