Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Need to know how to create a variable from accross multiple files

I am reading in multiple files with the same file layout, except for a created variable in each load statement.

I want to be able to add (sum) each of the created variables, which provides me with a combination variable (combo).

For example, the variables are var1, var2, var3, etc.  Var1=1, Var2=10 and Var3=100.  I want a variable that is a combination of 111.  Combo = 111 or Combo = 101.... you get the idea.

Help.  So the question is:

Do I calculate a new variable?

Do I develop and expression?

Do I use the “aggr” function?

I am new at this so I might need detailed instructions. I have attached a brief PowerPoint description of the desired outcome.

Thanks in advance.

Mark

3 Replies
MVP
MVP

Re: Need to know how to create a variable from accross multiple files

I can't find the attachement.

Could you also post the current script you are using to load the files and variables?

I assume you should be able to use something like

Let vCombo = RangeSum(var1, var2, var3);

manucamon
Valued Contributor III

Re: Need to know how to create a variable from accross multiple files

Hi Mark,

I have seen that your tables are the same fields, why don't create the same field name with other values and combine it with group by?

Kind regards

Not applicable

Re: Need to know how to create a variable from accross multiple files

Hello,

if I got it right, it is about summing and grouping. Please find an approach attached.