Power Query - Automatic filling planning data

Hi

I’m trying to build a forecast actual by planning

The basic idea is that every day I fill in a new tab the planning for that day and the actual of 4 previous days.
The reason I always write down 4 previous days is to keep the sequence in case it’s a weekend or a holiday.
Let’s say I filled in the actual data for the last time on Thursday and fill again on Sunday so I will have a sequence of data.

Everything works well except that on the weekend and on days I don’t fill I don’t have the planning data.

I want to add to the query for each day that I diont have the planning data the latest available data for planing/

I would appreciate an idea of how to do something like this

An example file is attached

Thanks in advance
test pq forecast.xlsx (72.5 KB)

In other words

Based on actual for a certain period
Let’s say 10 days, how do I calculate the gap against the plan?
According to the 4 day approach i have the sequence for the actual

The gap is that I don’t have the sequence for plan
But it is possible to use data from the last plan