Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

running total in Percentage return

Hi guys,

I am trying to create a graph that shows the running total of the percentage return of an investment portfolio that I created. The formula that I have come up with so far is this: (RANGESUM(ABOVE(SUM({$<CashFlowName={CashFlowInterest}>}CashFlow),0,rowno())))/(-Sum(If(DateFrom=RecDate,CashFlow),))

The first expression (the nominator) calculates the running total of the return on the investments, the second expression calculates the invested amount. So this actually should yield me the running total percentage return in each month but my graph only shows a value for my first month. I think that the problem lies in the if statement since in the other months the DateFrom does not equal the RecDate and that therefore the if statement chooses to go blank in stead of summing the CashFlow. So my question actually is: how do I lock in the initial investment amount in my formula?

Could somebody correct my formula? I would be very grateful.

1 Solution

Accepted Solutions
sunny_talwar

May be this:

(RangeSum(Above(Sum({$<CashFlowName={CashFlowInterest}>}CashFlow), 0, RowNo())))

/

(-Sum(TOTAL If(DateFrom=RecDate, CashFlow))

View solution in original post

2 Replies
sunny_talwar

May be this:

(RangeSum(Above(Sum({$<CashFlowName={CashFlowInterest}>}CashFlow), 0, RowNo())))

/

(-Sum(TOTAL If(DateFrom=RecDate, CashFlow))

Not applicable
Author

Thanks Sunny that seemed to work