October 7, 2015 at 7:58 am
Hi All,
I have question on an iif statement that I have seen and am trying to decipher.
I have one that looks like this (there are other parts to it):
iif( ((Fields!Traffic_2015.Value / Fields!Traffic_2014.Value) - 1) > 1
for the -1 what does this do? And when would you use it? I get the rest just this has confused me.
Thank you!
October 7, 2015 at 8:35 am
I have assumed it is just literally minus one haha! I think that might be the answer.
October 21, 2015 at 2:29 am
As pointed out by a fellow colleague, the minus one is doing what exactly it is supposed to do, which is correct.
So, why is the need to subtract 1 from a ratio. Below is what I could think of.
Your expression, seems is trying to find a ratio of traffic volume for current year and past year, and to be specific its calculating the percentage CHANGE.
Lets pour in numbers...
Year -- Traffic
2015 -- 120
2014 -- 100
Now how would you find the % CHANGE ?
% CHANGE = [(VALUE(2015)-VALUE(2014))/VALUE(2014)] * 100
= [(VALUE(2015)/VALUE(2014)) - 1] * 100
= [(120/100)-1]*100
= [1.2 - 1] * 100
= 20%
Possibly that explains your MINUS 1.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply