Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have some code which works:
[code]
if([Cancel Agreement Indicator]='N' and [Report Date]=[AGRDIMS.Agreement Activation Date] and vCriteria_AmtOperator<>'ALL' and vCriteria_MgnOperator='ALL',
sum(if([AGRDIMS.Current Net Cash Advanced] > $(vCriteria_Amt),1,0)),
if([Cancel Agreement Indicator]='N' and [Report Date]=[AGRDIMS.Agreement Activation Date] and vCriteria_AmtOperator='ALL' and vCriteria_MgnOperator<>'ALL',
sum(if([AGRDIMS.Current Net Cash Advanced] > $(vCriteria_Amt),5,0)),
if([Cancel Agreement Indicator]='N' and [Report Date]=[AGRDIMS.Agreement Activation Date] and vCriteria_AmtOperator<>'ALL' and vCriteria_MgnOperator<>'ALL',
sum(if([AGRDIMS.Current Net Cash Advanced] > $(vCriteria_Amt),10,0))
)))
[/code]
However in the section:
[AGRDIMS.Current Net Cash Advanced] > $(vCriteria_Amt)
I want to replace the angle bracket '>' with a variable where the user has selected an operator, however when I drop in the variable my expression stops working:
[AGRDIMS.Current Net Cash Advanced] $(vCriteria_AmtOperator) $(vCriteria_Amt)
Any idea's would be much appreciated.
Many thanks,
Phil
You can create a new variable to hold your entire expression. Something allong the lines of:
vExp
='If( [Value2] ' & $(vCriteria_AmtOperator) & ' [Value2], 10, 0)'
You can then add this variable to the expression of a chart like
=$(vExp)
Jay
Thanks Jay, that sounds a neat solution let me give it a try and I'll let you know how I get on.
Kind Regards,
Phil
Phil,
I need to amend my syntax above. It should have been:
='If( [Value2] ' & vCriteria_AmtOperator & ' [Value2], 10, 0)'
i.e the $() should not be around the variable name in the 1st part.
Jay