Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi guys! I'm a new QlikView user and I need to make that shows sales which were made during 2012 year. I want to make an if expression which have to be something like that: if (year=2012), then Sales else Null end. I tried this one if (year=2012, Sales, Null), but it says that Null is a bad field. Thank you in advance! 
 its_anandrjs
		
			its_anandrjs
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 sudeepkm
		
			sudeepkm
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		you may use set analysis
sum({<Year = {2012}>} Sales)
or you can make it dynamic:
sum({<Year = {"$(=max(Year))"} >}Sales)
.png) 
					
				
		
 bbi_mba_76
		
			bbi_mba_76
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
it is possible to write
if (year=2012, Sales)
if (year=2012, Sales, Null() )
but I don't see any aggregation.. sum( if (year=2012, Sales ))
or using set analysis sum({<year={2012}>} Sales)
 its_anandrjs
		
			its_anandrjs
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Write like expression like
if(Year = 2012 , Sum(Sales),Null( ))
 SunilChauhan
		
			SunilChauhan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		
sum(if(Year=2012,Sales)
and Year in dimension
it will automake - for year other than 2012
go to presentation-> missing symbol type null there
and null symbol_. type null there
 
					
				
		
Try this
=if (year='2012', sum(Sales), 'Null')
hope it will help........
 
					
				
		
Guys, you're awesome! Thank you for the quick answers!  
 
 its_anandrjs
		
			its_anandrjs
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I am Glad thanks  
 
Thanks & Regards
