I have time series data that is being imported to an excel table via power query. The data is daily data for several processes, that are identified as running or not running. So, my data tells me if the process is running - however I wish to identify if the process was running yesterday.
Actually. specifically i wish to identify the processes that shut down each day (ie, yesterday were running but today are not) and the processes that restarted each day (ie, yesterday were not running but today are running). With this in the excel table (that is returned form powerquery), I can pivot in excel to show the processes that shutdown today (or this week, or this month) and the processes that restarted today (or this week or this month).
I hope that makes some sense. below is example data. I'm australian so my dates are d/m/yyyy. To be clear, I've only shown two processes where, but my data has many hundreds, so im hoping for a generic solution.
You can see below that aaa went offline on 3/1/2020, and came back online 6/1/2020. bbb went offline 4/1/2020 and came back 5/1/2020. I'd like to create a column that identifies that fact. In excel it would be easy. I would create a dummy column called isOnlineYesterday to concatenate the process with the date, and then index(isonline,match(procecss+(date-1),isOnlineYesterday,0)). however I wish to do this within powerquery.
I hope my question is clear. Thank you for you cleverness.
Date Process IsOnline
1/1/2020 aaa true
1/1/2020 bbb true
2/1/2020 aaa true
2/1/2020 bbb true
3/1/2020 aaa false
3/1/2020 bbb true
4/1/2020 aaa false
4/1/2020 bbb false
5/1/2020 aaa false
5/1/2020 bbb true
6/1/2020 aaa true
6/1/2020 bbb true