I made a custom metric or attribute, and got the green check mark in the formula editor. However, when I try to use my new metric or attribute in a query, I get the following error:
The set of calculations  isn’t valid. Adjust the calculation and try again. (Error code: c2b7007d)
The error checker in the formula editor only checks the syntax of the formula. This means there's another error in the formula. Typically this means that the formula is referencing a field that doesn't exist. If you see this error, you should edit your formula and double-check that all attributes and metrics referenced in the formula are spelled correctly. Also, you should note that fields in the query editor are case-sensitive, so you should also make sure that all your attributes and metrics are using the correct case.