3 Replies Latest reply: Apr 30, 2013 10:13 AM by James Waller

How are these two Set Expressions different?

I would like to know why these two expressions would return different results?

They both fundamentally seem the same to me

=num(Sum({\$<d_DistanceApart_Miles={">=0<=\$(=varMaxDist)"}>}cen_Class_Data),'###,##0')

=num(Sum({\$<cen_Class_Data=P({1<d_DistanceApart_Miles={"<=\$(=varMaxDist)"}>}cen_Class_Data)>}cen_Class_Data),'###,##0')

• Re: How are these two Set Expressions different?

they seem to be formatted horribly.

Maybe this is more clear

```=Sum({\$<d_DistanceApart_Miles={">=0<=\$(=varMaxDist)"}>}cen_Class_Data)

=num(Sum({\$<cen_Class_Data=P({1<d_DistanceApart_Miles={"<=\$(=varMaxDist)"}>}cen_Class_Data)>}cen_Class_Data),'###,##0')
```
• Re: How are these two Set Expressions different?

Hi,

First expression returns the sum of cen_Class_Data which has d_DistanceApart_Miles greater than 0 and less than varMaxDist value.

Second expression returns the sum cen_Class_Data which has d_DistanceApart_Miles less than varMaxDist value.

Hope this helps you.

Regards,

Jagan.

• Re: How are these two Set Expressions different?

Could you help me write:

sum of cen_Class_Data where d_DistanceApart_Miles is LESS THAN OR EQUAL TO varMaxDist? I'm really struggling here.