Last active
April 9, 2022 14:24
-
-
Save RecalcOrDie/3781d173e1963ca88ae92b5b36e6fc60 to your computer and use it in GitHub Desktop.
Variance LAMBDA Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Name: VARIANCE | |
Description: Variance | |
Author: Carlos Barboza (inspired from a post on this formula by Mike Alexander aka DataPig) | |
Category: Formula | |
*/ | |
VARIANCE = LAMBDA( | |
ThisYear, | |
PriorYear, | |
IF( | |
OR( NOT( ISNUMBER( ThisYear ) ), NOT( ISNUMBER( PriorYear ) ) ), | |
"", | |
( ThisYear - PriorYear ) | |
/ ABS( ThisYear * ( PriorYear = 0 ) + PriorYear ) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment