Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
maprinci
Contributor II
Contributor II

Calculation for a user-selected field value and another field

Hello,

I am trying to do a calculation involving a user-selected field value and another field in a Qliksense app.  I want to sum a user-selected value from Field1 with each individual value from Field2 and then produce a third field with the result of this calculation. Below is an example:

Field1   Field2             Field3

1              5                    6

2              6                    7

3              7                    8

4              8                    9

For example, suppose there is a filter on Field1, and the user selects ‘1’. I want Field3 to equal 1+5 in the first row, 1+6 in the second row, etc. so that the Field3 would read as above.  The calculation I need to do is more complicated than addition, but I just need a simple way to do the calculation for one user-selected value and then entire other field, instead of row by row.

Please let me know of any suggestions.

1 Reply
Gysbert_Wassenaar

One of these should do:

  • Only(Field1) + Only({<Field1>} Field2)
  • Rangesum(Only(Field1) , Only({<Field1>} Field2))

talk is cheap, supply exceeds demand