Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 lain_
		
			lain_
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		With the tables I have in the qvw file below, one is a table of Var1 and some values calculated from an expression, the other is a table of Var2 and some values calculated from an expression. How do I take the average of these values, so that Var1 has an associated average and Var2 has an associated average. The goal is to then graph this. I attached an excel file of what I want to avoid confusion.
 Taoufiq_Zarra
		
			Taoufiq_Zarra
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Maye be qvw attached file ?
 Taoufiq_Zarra
		
			Taoufiq_Zarra
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Maye be qvw attached file ?
 lain_
		
			lain_
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thank you so much. To expand on this. How would I go about adding a listbox to select the Var1, Var2. Let's say I have Var1, Var2, Var3, Var4 and I want to be able to select some of these to do the calculations.
 Taoufiq_Zarra
		
			Taoufiq_Zarra
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		in this case I suggest you change ValueList to island table:
attached qvw file
IslanTable:
LOAD * INLINE [
Var,Measure
Var1,Avg(total aggr(sum(total <Var1> value1) / sum(total <Var1> value2),Var1))
Var2,Avg(total aggr(sum(total <Var2> value1) / sum(total <Var2> value2) ,Var2))
];
 lain_
		
			lain_
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thank you! I ended up needing to use a variable so I couldn't implement what you did with the load script, so I expanded on your first solution by replacing the value list with the listbox and adding more Var(s) in the match function. I'll accept your first solution to this since it directly solves my original question in case anyone else needs it.
