Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

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

Re: running total in Percentage return

May be this:

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

/

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

2 Replies

Re: running total in Percentage return

May be this:

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

/

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

Not applicable

Re: running total in Percentage return

Thanks Sunny that seemed to work

Community Browser