2 Replies Latest reply: Mar 27, 2012 5:23 PM by knguyen1 RSS

    Simple growth line chart

      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.