Hi @ThomasH,
Just to double check. You had some tasks in your planner which have been 100% completed yesterday (2022-09-01), correct? If there aren't any the outcome of [] is expected.
To explain the expression:
I used an and to add the second part of the condition. Both expressions should result in true in order to get a planner item back.
and(<expression1>, <expression2>)
That second expression is :
equals(formatdatetime(item()?['completedDateTime'], 'yyyy-MM-dd'), addDays(utcNow(),-1, 'yyyy-MM-dd'))
In that second expression I am comparing the completedDateTime of the item with yesterday. They need to be exactly the same.
So, for today that means the completedDateTime needs to be equal to 2022-09-01.
Both will be formatted into the same date time format, yyyy-MM-dd. For item()?['completedDateTime'] I am using a formatDateTime function.
formatdatetime(item()?['completedDateTime'], 'yyyy-MM-dd')
Yesterday is retrieved by using UtcNow as the timestamp and using an adddays function to calculate yesterday.
addDays('<timestamp>', <days>, '<format>'?)
When using -1, you subtract 1 day.
addDays(utcNow(),-1, 'yyyy-MM-dd')
Hope this makes a bit more sense.