6 Replies Latest reply: Mar 9, 2011 1:54 AM by Yogesh Bari

# Expression Logic Question

=sum({\$<Type = {'New'}>} Amount)

As I understand it this will sum Amount as long as the Type is equal to 'New'. How do you change this formula so that it sums Amount if type is NOT equal to new.

I tried

=sum({\$<Type <> {'New'}>} Amount) but the use of the <> does not seem to work.

• ###### Expression Logic Question

Hey,

try something like:

=sum({\$<Type = Type - {'New'}>} Amount)

• ###### Expression Logic Question

Try the following which replaces the '=' with '-':

=sum({\$<Type - {'New'}>} Amount)

• ###### Expression Logic Question

Thanks, one more question...

If I want to make sure that a column called Quantity is equal to 1,

would it just be

=sum({\$<Quantity = {1}>} Amount)

Reading the help file says that {1} represents the whole set. So I am a bit confused.

• ###### Expression Logic Question

The first part of the set inside the '{' is the set identifier. In your case \$, meaning the records based on the current selection. If you replaced the \$ with 1, then your set identifier would represent a full set of all records.

Inside the <> brackets is your set modifier. As part of the set modifier, the {1} represents the value 1.

Your set would read - Returns the Amount for the current selection with a new selection for Quantity.

• ###### Expression Logic Question

Hello You just need to add a ~ sign like sum( {\$<~Type= {"*NEW*"}>} Amount) This excludes the selection containing NEW.

ANDY

• ###### Expression Logic Question

Hi HeyZeusChris,

Try this expression,

=sum({\$<Type = - {'New'}>} Amount)

Thanks&Regards,

Yogesh