Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
can someone help clarify what is going on here?
+(sum(Aggr(sum({$<%_AccountNumberIDKey /= {'52','53'}>}
IF((%_AccountNumberIDKey <> 52 or %_AccountNumberIDKey <> 53) and [Logistics Fee] > 0 and [Logistics Fee] <= 0.12,Sales,0))*([Logistics Fee]),DebtorName,ItemDescription))*0.5)
specifically what is going on with:
/=
in the first line of the expression
If the selection contains 1, 2, 3; the expression will return 1, 2, 3, 52, 53
If the selection contains 1, 2, 52; the expression will return 1, 2, 53 (52 is in both sets so it is excluded)
If the selection contains 1, 2, 53; the expression will return 1, 2, 52 (53 is in both sets so excluded)
If the selection contains 1, 2, 52, 53; the expression will return 1, 2
Google Exclusive Or (XOR) for more
Hi
/= is the exclusive OR (XOR or symmetric difference) operator. It returns those members of each set which do not exist in the other set. In this contexm the current selection is one set, and the bracketted expression {'52','53'} is the other.
Hope that helps
Jonathan
so in this case the exclusive OR returns everything except '52' and '53' ? Is that right?
Chris
It will return everything in the current selection (the $ sign) other than 52, 53. It will also return either or both those two values if they don't exist in the selection. In other words, it will include everything that exists either in the selection, or in 52,53 - but not both.
Is that a little clearer?
Jonathan
yes, that is a little clearer I think.
Just need a little more clarification please.
you state:
"it will also return either or both those two values if they don't exist in the selection"
do you mean either 52 or 53, or both 52 and 53
OR are you referring to the current selection as one value and 52, 53 as another value
So does that mean if there is no selection, it automatically includes 52,53 but nothing else?
Or is it saying for example if 52 is selected it will include 53 as well, but nothing else?
If the selection contains 1, 2, 3; the expression will return 1, 2, 3, 52, 53
If the selection contains 1, 2, 52; the expression will return 1, 2, 53 (52 is in both sets so it is excluded)
If the selection contains 1, 2, 53; the expression will return 1, 2, 52 (53 is in both sets so excluded)
If the selection contains 1, 2, 52, 53; the expression will return 1, 2
Google Exclusive Or (XOR) for more