Discussion Board for collaboration on QlikView Scripting.
I have N tables with the same format, and how I want is set a Variable that will be the sum of the Column X with a particular condition.
I would like to set in Edit script vTotAge from all table that I have.
Somethings like this :
if(Nome='Pippo') then Sum(Age) from Table1 as TotTab1;
if(Nome='Pippo') then Sum(Age) from Table2 as TotTab2;
if(Nome='Pippo') then Sum(Age) from TableN as TotTabN;
vTotAge = TotTab1+ TotTab2+...+ TotTabN
Someone have a Solution for my Problem.
Thanks in advances
If someone can advise me other solutions for this it is good anyway..
Well, if you have N tables with same format, would suggest do the caoncatenation of all the tables and make it one and then try sum(Age)..
Else do something like: aggr(sum(Age),Nome)
First Concatenate all the tabels
sum(Age) as Age
group by Nome
Now you can simply write expression in Chart as sum(Age)
As stated by the people above, I would advise that you concatenate the tables together.
I would add a new field like
'Table1' As Table
So if needed you can pick out values from individual tables.