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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Syntax to use variable to form field name in Sum formula

Hi Qlikviewers,

I have  a series of field names in my data load [May Revenue], [Jun Revenue], [Jul Revenue], etc.

The field is used in a simple Sum formula, example =Sum ([May Revenue]), but instead of hard coding the formula for each month, I want to allow the user to specify the month and the value is saved in a variable (vMonth).  This variable should be combined with the word "Revenue" to form one of the field names above and used in a Sum formula.  Ideally, it would be something like this =Sum(vMonth&"Revenue").

How would I be able to accomplish this?

Thanks in advance.

0 Replies