Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 taylor_jesse
		
			taylor_jesse
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
I have an expression that included variables. I keep getting an error in expression but can't seem to find the issue.
=if(Loc_Status='ONG',sum( $(Set60Days) IdealFlag)/Count(DISTINCT $(Set60Days) CalendarDate))
Variable description below:
Set60Days = {$<CalendarDate = {">=$(v60Days) <=$(vMaxCalDate)"},OPS_MonthYear=>}
v60Days = AddMonths(max(CalendarDate),-2)
vMaxCalDate = max(CalendarDate)
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I keep getting an error in expression but can't seem to find the issue.
Is that your expression editor says that there is an error or do you see an error/ or see nothing when you click okay on the expression editor and look for the result in the object? The reason I ask this is because, there are times when expression editors don't really understand the syntax and will say that there is an error where there is none. In your case...
=if(Loc_Status='ONG',sum( $(Set60Days) IdealFlag)/Count(DISTINCT $(Set60Days) CalendarDate))
the part in red will def. throw an error in expression editor, but it may still work if the value within that variable is good... which it seems like is (syntax wise).
 
					
				
		
 vishsaggi
		
			vishsaggi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		What value does your variable Set60Days display when you use $(Set60Days) can you try this in your text object and let me know.
And you cannot use $(Set60Days) in your sum like that. What exactly you are trying to do in your below expr?
I mean sum(IdealFlag) and what is this Set60days doing here are you multiplying ? or doing something else? You might need set analysis is what i think. Please elaborate a little more.
=if(Loc_Status='ONG',sum( $(Set60Days) IdealFlag)/Count(DISTINCT $(Set60Days) CalendarDate))
 
					
				
		
 poojashribanger
		
			poojashribanger
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		if(Loc_Status='ONG',sum( {<$(Set60Days)>} IdealFlag)/Count({<$(Set60Days)>} DISTINCT CalendarDate))
enclose that variable in set analysis.
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I keep getting an error in expression but can't seem to find the issue.
Is that your expression editor says that there is an error or do you see an error/ or see nothing when you click okay on the expression editor and look for the result in the object? The reason I ask this is because, there are times when expression editors don't really understand the syntax and will say that there is an error where there is none. In your case...
=if(Loc_Status='ONG',sum( $(Set60Days) IdealFlag)/Count(DISTINCT $(Set60Days) CalendarDate))
the part in red will def. throw an error in expression editor, but it may still work if the value within that variable is good... which it seems like is (syntax wise).
 
					
				
		
 taylor_jesse
		
			taylor_jesse
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Same error
 
					
				
		
 taylor_jesse
		
			taylor_jesse
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
It shows values but the expression editor says there is an error. I think you are right. I experience that a lot.
 
					
				
		
 taylor_jesse
		
			taylor_jesse
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		The expression works but the editor says error in expression
