Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Need to achieve the below Calculation from the chart level:
Col1 | Col2 | Output | Calculation |
1 | 1 | 1 | 1*1 |
5 | 2 | 15 | 5*1 + 5*2 |
8 | 3 | 48 | 8*1+ 8*2 +8*3 |
6 | 4 | 60 | 6*1 +6*2 +6*3 +6*4 |
2 | 5 | 30 | 2*1+2*2+2*3+2*4+2*5 |
Col1 and Col2 are input fields.
Output Column is the Output expected
Calculation Column tells the way the Output should be calculated.
Could anyone help in solving this issue?
Thanks in advance.
maybe in a straight table
dimension
Col1
expression
Col1 * rangesum(above(sum(Col2),0,rowno()))
You need the triangular number of col2 * Col1
The formula for triangular numbers is (n*(n+1))/2
so your expression will need to sum(((Col1*(Col1+1))/2)*Col2)
Output=Col1*Col2*(Col2+1)/2
Easiest way i guess