I try to guess what you are looking for.
Please give a try with following expression and see , is that something you are looking for ? I meant check if that gives your desired result ?
That will simply Sum ( All Non selected) - Sum( all selected based on Filter pane ) / count ( distinct key)
I think I have got my self confused.
Basically I am looking at replacing field names with selections in an expression
For example (Sum(GetFieldSelections(PU,',',1))-Sum([Y8-Pu2]))/Count(distinct Key)
What I am not clear on is can I specify which selection to use in the field. For example can I use the first 2 selections from the same field, one for the first part of the expression and the second in the same expression.
Hope this makes a bit more sense.
Thanks for the help.
in case you want to separate two selected value from one field
you may try
with assumptions that,
1. Field contails only 2 values Or will max two values can be selected.
2. Order of values selecte is not taken in to account . You can see that yourself that getfieldselections would return in one sort order.
1st Assumption] ?
If the field has only two values! wouldn't it be easier to place them directly in the set analysis rather than forcing the user to select the values to evaluate?
We both agree order on selection is not taken into account, so how can we be so sure that Subfield 1 value needs to be placed in the first expression not the second??
yes it matters in only Max 2 selections...so lets drop only 2 value assumption
yes you can not make out which one to use in which order.
yes its not final solution , I suggested those just to give him some direction in how he can separate two values from selected values. It's now upto him how he intends to take it further
Store your selections in variables and use variables in set analysis
You can store the values, but NOT in the order they were selected; so you cannot make out which was selected first; leave out first two!
So your best bet is to create two list boxes for both filters.
vFilter1 = GetfieldSelections(YourField1);
vFilter2 = GetfieldSelections(YourField2);