Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
guilhermemedin1
Regular Visitor

Return status from previous day

I am trying the get the previous status of ovens on the day before. Example. 

How can I create the "Previous day status" collum?

OvenDaily statusDayPrevious day status
Oven 1Operating01/01/22 
Oven 2Operating01/01/22 
Oven 3Stop01/01/22 
Oven 1Stop01/02/22Operating
Oven 2Operating01/02/22Operating
Oven 3Stop01/02/22Stop
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@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])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@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])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks a lot!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.