Hi, I have a fairly large data set (around 1 million observations) that looks something like the following table: ID n P y 1 5 11.4 0.04 2 8 7.6 0.02 3 13 12.2 0.01 4 4 3.9 0.07 ... I want to create a column D that calculates the following for each row: P * [ (1+y)^0 + (1+y)^1 + (1+y)^2 + ... + (1+y)^n ] I tried using a for loop but wasn't able to perform the required calculation. Any help would be much appreciated. Thanks
... View more