Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am fairly new to QV, and was trying to create a simple growth line chart base off a data stream of returns, below:
my initial dollar amount is $100(is variable set by input box), I have a table with dates and returns.
Date Return Market Value (expression)
1/31 2.80% =$100*(1+2.80%) = 102.80
2/29 -3.45% =$102.80*(1+(-3.45%) = 99.25
3/31 5.50% =$99.25*(1+(5.50%) = 104.71
I want an accumulate expression, thus my expression should have a conditional statement to handle the first month calculation with the starting market value of $100, then a second calculation to handle the periods after by using the market value of the previous period. Here is what I have so far:
=if([Date]=vStartDate,(($(vAmt))*(1+[Return])),(($(vAmt))*[Return]))
I need that second ($(vAmt)) to be the value of the previous market value. Any help would be greatly appreciated, FYI-I only have personal edition, so I can't share or view other .qvw files.
Thanks in advance.
If the previous market value is going to be visible in the table or graph you can use the above() function to call it. It that is not the case, you should look in the community for the topic "asof" table or date island table that are methods used to show accumulate values.
Karl
If the previous market value is going to be visible in the table or graph you can use the above() function to call it. It that is not the case, you should look in the community for the topic "asof" table or date island table that are methods used to show accumulate values.
Karl
Thanks, Karl. The above() works great, it took me a while to figure out how to point the above function on the same column.