Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 arusanah
		
			arusanah
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Can we use set analysis in Where clause ??
e.g i have to find customer sales for a payer for years 2013 & 2014 normally we use it in expression as
({$<TimeLine.Year={2013,2014}>}Fact.CustomerSales)/1000
every time i select data this condition gets re evaluated which makes app slower . i was wondering can we use this in where clause
where ({$<TimeLine.Year={2013,2014}>).
pls suggest
 
					
				
		
 alexandros17
		
			alexandros17
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Unfortunately set analysis cannot be used in a where clause, in your query you can write:
...
where TimeLine.Year='2013' or TimeLine.Year='2014'
let me know
 buzzy996
		
			buzzy996
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		NO.
 
					
				
		
Try with the follow approach:
in Load statement (example):
LOAD
Year,
if(Year=2013 or Year=2014,1,0) as Flag1314
FROM [...];
in Set Analysis
Sum({<Flag1314={1}>}Fact.CustomerSales)
