5 Replies Latest reply on May 26, 2016 10:52 AM by erolst

# Test equivalency of multiple items

What's the easiest way to test, in a calculation, if A=B=C=D=E?

I feel like there might be something more compact than "A=B and A=C and A=D and A=E". Is there?

- RG>

• ###### 1. Re: Test equivalency of multiple items

I don't think so – there are quite compact expressions to test a group of fields on all empty / all non-empty, but for equivalence you probably have to look at every single field.

OTOH, why would you need to do that? What's the real-world scenario?

• ###### 2. Re: Test equivalency of multiple items

The use case is hard to generalize, but I want to verify that all instances of an item have the same category.

Category (itemA) = Category (itemB) = Category (itemC) etc.

This way I can say that N items are in Category (itemA) instead of having to list the categories for each item repeatedly.

Thanks for confirming.

- RG>

• ###### 3. Re: Test equivalency of multiple items

I wonder if FilterValues might help here in some way.

beverly

1 of 1 people found this helpful
• ###### 4. Re: Test equivalency of multiple items

Hm... I'm not sure about FilterValues, but I think you're on the right track... this should do the trick:

PatternCount ( B & C & D & E ; A ) = 4

Thanks!

- RG>

• ###### 5. Re: Test equivalency of multiple items

I'm afraid that's not the right answer.

What you mean is

Let (

testList = List ( B ; C, D ; E ) ;

ValueCount ( testList ) = ValueCount ( FilterValues ( testList ; A  ) )

)

because that tests on complete lines, not just sub-strings.

1 of 1 people found this helpful