Monotonously increasing cost calculation over a selected duration of time

Hi, I want to calcute the cost of memory/cpu usage for different teams(with underlying kubernetes infrastructure) monotonously over a period of time(lets say 3 months).The formulla i am using currently is

sum(container_cpu_usage_seconds_total{namespace=~"$namespace",pod="$pod")* $costcpu

  • sum(container_memory_usage_bytes{namespace=~"$namespace",pod=~"$pod"})/1024/1024/1024 * $costram

However the case with this is it doesnot give me the monotonously increasing cost over a selected duration time.It just gives me sum at that time instant.So the graph obtained goes up and down based on usage at that time instant.

Can you please suggest me the alternative way/function/formulla so that i can achieve a monotonously increasing cost in grafana over a selected time duration