Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Chart Calculation

Hi All,

Need to achieve the below Calculation from the chart level:

Col1Col2OutputCalculation
1111*1
52155*1 + 5*2
83488*1+ 8*2 +8*3
64606*1 +6*2 +6*3 +6*4
25302*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.

3 Replies
maxgro
MVP
MVP

maybe in a straight table

dimension     

Col1

expression    

Col1 * rangesum(above(sum(Col2),0,rowno()))

1.png

Anonymous
Not applicable
Author

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)

Not applicable
Author

Output=Col1*Col2*(Col2+1)/2

Easiest way i guess