You might need some small adjustments to respect the year and/or a switch over a year or similar. But if add (per concatenate) these TOTAL within the script, maybe in an parallel field only for these purpose it would be easier to handle within the gui because you need only to query if your dimension-value is TOTAL or not.
..., // pick(match() expression like above only per Week
...) // pick(match() expression like above only per Year
Not extremly nice but it should work. You should also consider to use several charts each specialized to a certain dimension or other things to keep the things simpler - maybe within a container and/or nested containers.