This is an example of using the Custom Display As element added in 2017.2 to correctly calculate the variance on Custom and Metric accounts.
This sample shows how to add an Account Attribute then reference it in a formula to flip the results of the out-of-the-box variance calculation.
Tips covered in this video:
- Attribute name requirements to be used in formulas
- Using spaces and comments to make your formulas easier to follow
- Using the fast Iff statement and testing for the most common case with exception as else for best performance
- Search function to check for a value in the Account Attribute name, returns 0 if not found