Forum Discussion
cpunnett
8 years agoHelper II
Calculating a variance
I'm trying calculate a variance and need help please. I'm trying to take submissions from Year 2018 subtract submissions from 2017, then divide that number by submissions from 2017. My problem is w...
danextian
8 years agoSuper User
Hi cpunnett,
You can try creating a measure in DAX using the following formula
VARIANCE =
VAR SUBMISSIONS_ =
SUM ( 'Table'[Submission Column] )
VAR SUBS2017_ =
CALCULATE ( SUBMISSIONS_, 'Table'[Year Column] = 2017 )
VAR SUBS2018_ =
CALCULATE ( SUBMISSIONS_, 'Table'[Year Column] = 2018 )
RETURN
DIVIDE ( SUBS2018_ - SUBS2017_, SUBS2017_ )
cpunnett
8 years agoHelper II
That helps me understand how it would work, I appreciate that. But I can't seem to get mine to work. All I get are zeroes. When I return either variable I get the same numbers as the sums. I not sure what I'm not doing correctly yet.