Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Multiply Previous Rows in a Table

I have a table here:

Date               Rate

2014/11/01     N1

2014/11/02     N2

2014/11/03     N3

and I wanna add a column on the right to be:

Date               Rate          Value

2014/11/01     N1          X1

2014/11/02     N2          X2

2014/11/03     N3          X3

which

X1 = N1,

X2 = N1 * N2,

X3 = N1 * N2 * N3,

.....

However, rangeSum doesn't help on this issue, it only solves the accumulated problem.

any one have any ideas about this?

12 Replies
Not applicable
Author

it works!!! Thank you very much jagan!!!

jagan
Partner - Champion III
Partner - Champion III

Hi,

Please find attached file for solution in front end.

Hope this helps you.

If you got the answer please close this thread by giving Correct and Helpful answer to the useful posts.

Regards,

jagan.

smago001
Contributor
Contributor

Here is my small contribution.

In my case, I could not use the SUM function, being that the content of the column already had aggregated values.

The following suggestion goes in a different column in the same table (say, a column after Value) and it would be your third column (assuming that Date is a Dimension and that Rate and Value are columns 1 and 2 from your list of expressions)

If (RowNo() = 1, Column(1), Column(1) * above(Column(3)).

I hope it helps, Smiley Wink

Regards,

S.