Keep completed/finished pods on graph for some time

#1

How can I keep completed/finished/failed pods data in the Grafana Kubernetes App in Containers tab on Total Memory usage graph?

max(container_memory_usage_bytes{pod_name=~"$pod"}) by (pod_name)

keeps them only for very short period of time. Ideally I’d like to keep them for 7 days.