Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mark_casselman
Creator
Creator

Strange result combining selection and set expression

Today I encountered a strage result. Can someone explain and/or resolve this ?

When i make a selection on field AgeGroup I get a normal result in the count of male and female amounts:

selection1.jpg

But when i make an additional selection on gender i get a strange result:

selection2.jpg

It is strange to me that when i have selected 'Female' I do get an amount for Male (14). I expected the result to be zero. No Males selected, so the sum of the amount or male should be 0.

The only reason I could come up with is that the set expression <Gender={'Male'}> overrides the selection Gender=Female, though I do specify that the set expression should work on the selection ?

Mark

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try the intersection operator *

=sum({<Gender *= {'Male} >}Amount)

View solution in original post

3 Replies
jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Hi,

that's the normal behaviour of Set Analysis, In your case, the expressions will respond to any dimension but Gender. It means that any selection that you make will affect except for Gender. That's because Gender is fixed (Male in one expression and Female in the other. So, in your example if you select Gender = Female it would not affect the expression with Gender = Male,

regards

mark_casselman
Creator
Creator
Author

Thanks Jaime,

Any suggestions to get the result 'correct' meaning getting the amount 0 for gender Male when female is selected ? I want to use the formula in a text box and for the user the result is 'wrong', getting male=14 when female is selected.

swuehl
MVP
MVP

Try the intersection operator *

=sum({<Gender *= {'Male} >}Amount)