Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
I'm getting an invalid expression in my load script. Do you see anything wrong? Thanks.
IncentivePoints:
load
[Territory Manager],
if (PriSecCat = 'Primary',
if ([TotalVolumeLbs]/[TotalBudgetLbs] *[Points] > [Points] * [Threshold]/100,
sum([TotalVolumeLbs]/[TotalBudgetLbs] *[Points]))) as PriPointsIndex,
if (PriSecCat = 'Secondary',
if ([TotalVolumeLbs]/[TotalBudgetLbs] *[Points] > [Points] * [Threshold]/100,
sum([TotalVolumeLbs]/[TotalBudgetLbs] *[Points]))) as SecPointsIndex
Resident IncentiveSummarized
Group by [Territory Manager]
01/25/12 17:35:35: 1265  IncentivePoints:
01/25/12 17:35:35: 1266  load
01/25/12 17:35:35: 1267  [Territory Manager],
01/25/12 17:35:35: 1268  
01/25/12 17:35:35: 1269  
01/25/12 17:35:35: 1270  
01/25/12 17:35:35: 1271  
01/25/12 17:35:35: 1272  if (PriSecCat = 'Primary',
01/25/12 17:35:35: 1273     if ([TotalVolumeLbs]/[TotalBudgetLbs] *[Points] > [Points] * [Threshold]/100,
01/25/12 17:35:35: 1274        sum([TotalVolumeLbs]/[TotalBudgetLbs] *[Points]))) as PriPointsIndex,
01/25/12 17:35:35: 1275  if (PriSecCat = 'Secondary',
01/25/12 17:35:35: 1276     if ([TotalVolumeLbs]/[TotalBudgetLbs] *[Points] > [Points] * [Threshold]/100,
01/25/12 17:35:35: 1277        sum([TotalVolumeLbs]/[TotalBudgetLbs] *[Points]))) as SecPointsIndex
01/25/12 17:35:35: 1278  Resident IncentiveSummarized
01/25/12 17:35:35: 1279  Group by [Territory Manager]
01/25/12 17:35:35:        3 fields found: Territory Manager, PriPointsIndex, SecPointsIndex, Invalid expression
01/25/12 17:35:35:       Error: SecPointsIndex, 
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try
IncentivePoints:
load
[Territory Manager],
sum( if (PriSecCat = 'Primary' and ([TotalVolumeLbs]/[TotalBudgetLbs] *[Points] > [Points] * [Threshold]/100) , [TotalVolumeLbs]/[TotalBudgetLbs] *[Points])) as PriPointsIndex,
sum( if (PriSecCat = 'Secondary' and ([TotalVolumeLbs]/[TotalBudgetLbs] *[Points] > [Points] * [Threshold]/100), [TotalVolumeLbs]/[TotalBudgetLbs] *[Points])) as SecPointsIndex
Resident IncentiveSummarized
Group by [Territory Manager];
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try
IncentivePoints:
load
[Territory Manager],
sum( if (PriSecCat = 'Primary' and ([TotalVolumeLbs]/[TotalBudgetLbs] *[Points] > [Points] * [Threshold]/100) , [TotalVolumeLbs]/[TotalBudgetLbs] *[Points])) as PriPointsIndex,
sum( if (PriSecCat = 'Secondary' and ([TotalVolumeLbs]/[TotalBudgetLbs] *[Points] > [Points] * [Threshold]/100), [TotalVolumeLbs]/[TotalBudgetLbs] *[Points])) as SecPointsIndex
Resident IncentiveSummarized
Group by [Territory Manager];
 
					
				
		
Fantastic. That did it. Thanks for your help.
