Derive frontmatter attributes from others with Templater

I can’t answer the question without having to do the legwork I’m afraid.
But seems like you are handy with code.

If no one can solve your problem I propose you give searching for habit trackers on the forum a go.
I added some customization guide of some sort to this one:

Find the zip to download near the end of the thread as the introduction write-up leads to a 404.

It needs the Datacore plugin installed via Brat plugin.
You can easily change or add to the frontmatter keys your own custom properties.
More of an eye candy, that one, I’ll admit.