Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi
We have list of years followed by
2014
2013
2012
2011
We want compare 2014 and 2013.how to select second maximum value from
Kindly advise me
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Max(Field, 2) // '2' is the rank
 
					
				
		
hi
Thanks,
but it not working.This is my expression
"If(Year=Max(Year,2),Year,(Sum(HWB_WT/1000)+Sum(VOLUME_IN_TEUS)))"
 kaushiknsolanki
		
			kaushiknsolanki
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Create a variable and put =max(Year,2) there, and then use the variable in your if statement.
"If(Year=variable,Year,(Sum(HWB_WT/1000)+Sum(VOLUME_IN_TEUS)))"
Regards,
Kaushik Solanki
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Max( ,2) is fine. The issue is how and where you use it. Is it a chart or text box? If chart, what are the dimensions..., so many questions ! Better, try to share your sample qvw.
 
					
				
		
hi
still same issue.it is not working
 its_anandrjs
		
			its_anandrjs
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Did you try this
If(Year = Max(Year)-1,Year,(Sum(HWB_WT/1000)+Sum(VOLUME_IN_TEUS)))
 
					
				
		
yes,
but not working anand.
 SunilChauhan
		
			SunilChauhan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		try this
let vmax2=Max(Year,2);
if( Year=$(vmax2),Year,(sum(HWB_WT/100))+sum(VOLUME_IN_TUES)))
or attched sample
hope this helps
 
					
				
		
Hi,
Sorry this is not working.
how to compare current and previous year value.
