Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi,
does anyone understand why qlikview does not accept an if statement around the following?
sum(if(Aggr(
       sum({< eng_costcenter_key = {$(vCostCenter)},hours_month = {'$(=date($(vReportingDate)))'}, Z_directe_code_flag = {1},statusCode={'OPN'}>} timeAmount), 
       engagementId) = 0, 1)) 
example:
if(
sum(if(Aggr(
       sum({< eng_costcenter_key = {$(vCostCenter)},hours_month = {'$(=date($(vReportingDate)))'}, Z_directe_code_flag = {1},statusCode={'OPN'}>} timeAmount), 
       engagementId) = 0, 1)) 
>1, do something) is not allowed.
thank you
 gussfish
		
			gussfish
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		In what context are you using this statement? e.g. is it for the color of a calculated dimension of a bar chart, or the value of a variable that's used in an expression in a ...
And in what sense does QlikView not accept the statement? If it's merely that the expression editor is putting red squiggly lines under it, but it otherwise is producing correct results, that's not really an issue. So what is the precise symptom?
 
					
				
		
Hi, thanks.
Well it does not return any values. (only -), if I remove the outer if, it works fine.
for your information. I am creating a kpi dashboard. So in one table, i put: if kpi is 11 then..... (the aggr function)
if 12, then some other...
 
					
				
		
 jonathandienst
		
			jonathandienst
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi
Can you run the first example in a tex box, or is it only useful as a chart expression? Better still, I suggest that you post your model, or a sample, to help disagnose the problem.
Regards
Jonathan
