FYI: I noticed that in the editor for chart formulas, it can throw an error when you try to break up complex formulas across multiple lines. Devs do this sometimes to make reading the formulas more easy. The following code works on one line, but doesn't work on multiple lines. It may have to do with the quotes marking string literals, but idk. I'm not sure if it's a bug but FYI it'll save you some time.