Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 Frank_Hartmann
		
			Frank_Hartmann
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hallo QV Community
I use the following formula in the chart for accounting the moving average:
Rangesum(above(Y,0,Row())/Row()

Is there any possibility to export the last value (=9) of the Rangesum formula to a textbox?
I tried to use the Rangesum formula within a textbox but it doesnt work for specific month.
The reason why i want to get this value to a textbox is because i need the value exported per macro to a powerpoint
document as picture or as object.
any ideas?
thanks for your help
 
					
				
		
 giakoum
		
			giakoum
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 giakoum
		
			giakoum
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		try to aggregate over y and take the max, something like :
Rangemax(aggr(rangesum(above(y,0,Rowno())), y))
 Frank_Hartmann
		
			Frank_Hartmann
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		thank you for your tip. the following formula works for me
max(aggr(rangesum(above(y,0,Rowno()))/RowNo(), y))
But what if the actual value is not the max value? then the value will not be shown in the textbox.
any ideas?
 
					
				
		
 giakoum
		
			giakoum
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		add firstsortedvalue function in the expression based on x axis instead of rangemax
 Frank_Hartmann
		
			Frank_Hartmann
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		ok, now i have:
FirstSortedValue(aggr(rangesum(above(y,0,Rowno()))/RowNo(),y),x)
that gives me the firstvalue (=3), but i need the last value (=9)
what a pitty that there is no lastsortedvalue function in QV
any ideas?
 
					
				
		
 giakoum
		
			giakoum
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		FirstSortedValue(aggr(rangesum(above(y,0,Rowno()))/RowNo(),y), -x)

 Frank_Hartmann
		
			Frank_Hartmann
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thank u very much 
