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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum of a variable field name

Hi Everyone,

Wish you all a very very happier happy new year.

I have a question.

I have following fields SALESA, SALESB, SALESC and so on.

Now say I have a temp table from which a variable can hold the aforementioned fieldnames in it.

For example if an user selects SALESA from the temp table

then the variable vSumofSales= 'SALESA'

Now what I want to achieve is = Sum($(vSumofSales).

Is it possible, if yes, then please suggest how.

Many thanks in advance.

Have a great year ahead.

1 Reply
Not applicable
Author

Hello friends,

I found a solution myself.

Here it is

I used a second variable vSum= Chr(91)&vSumofSales&Chr(93)

The result is vSum=[vSumofSales] which can then be used as a variable field-name.

If others has a better solution please share.

Thanks,