How to display 0 when there is no data in time series?

Thank you so much! Almost done!
Now there’s another problem: there’s more data that you don’t need.


I don’t need data beyond seven days, which is the part circled by red pen. I tried to put the part after group by directly into $__timeGroup, but it didn’t work. I hope you can help me.