Get value 7 days ago from 00:00 to 00:00

Hey.

I have multiple queries where I am trying to get the past 7 days of data, each laid out one day at a time.

However, I am facing a challenge with my current approach, the queries are as follows:

sum_over_time( my_value [1d] offset 7d )
sum_over_time( my_value [1d] offset 6d )
sum_over_time( my_value [1d] offset 5d )

The way I am offsetting here is getting it from the current time, 7 days ago. I want to get 1 days worth of data, 7 days ago, at midnight.

The challenge here is that I cannot do any calculations in the offset or time range.

The only solution I found has been either to make many query variables, which I want to avoid since it looks unorganized and cluttered, or to do this:

sum_over_time( my_value [7d] offset $seconds_since_midnight ) - sum_over_time( my_value [7d] offset $seconds_since_midnight )

BUT, this is so slow it takes 2 minutes to do a single query.