Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Using Set Analysis can we Exclude all the selections Except one field.
sum({1<FIELD1=FIELD1>} Sales) : This does not work.
Does any one have other alternatives.
Regards,
MAK
Thank You Very Much.
I had "-" in my value, that is why it was giving problem. Now solved.
=sum( {1 <Field3= {$(= '"'& concat( Field3,'", "' )& '"')}>} Sales)
Some improvement to your code. This works even for bad data.
This will return a quoted value list which is much better. But I wonder why you're using concat instead of getfieldselection?
The above solution is good for QV 8.5 and it makes the chart little slow.
Is there any other faster solution in V 9.0 or V 10
Ralf Becher wrote:I wonder why you're using concat instead of getfieldselection?
Well, the difference would be if nothing is selected, everything ends up on the concat() list, and nothing ends up on the getfieldselections() list. So it depends on if you want nothing or everything, I guess.
I'm not on 9.0 yet, but doesn't it let you specify the set of all possible values for a field? So you can very directly just say "ignore all selections, except for this field, where you should use all possible values". Someone else will have to supply the syntax. I suppose I could look it up if I weren't lazy, but I'm lazy.
> =sum( {1 <Field3= {$(= '"'& concat( Field3,'", "' )& '"')}>} Sales)
> Some improvement to your code. This works even for bad data.
Just for refinement, try if this improves the performance: ... concat( distinct Field3, ...
By ignoring any duplicate values, it should work better in case your Field3 is heavily populated.
[quote user="Tanel Rüütli"]
> =sum( {1 <Field3= {$(= '"'& concat( Field3,'", "' )& '"')}>} Sales)
> Some improvement to your code. This works even for bad data.
Just for refinement, try if this improves the performance: ... concat( distinct Field3, ...
By ignoring any duplicate values, it should work better in case your Field3 is heavily populated.
Ah, yes. I've made THAT mistake before. Definitely use distinct if your field values are not already distinct. It can make a huge difference in performance.
This Works for V9.0
sum( {1 <Field3= P(Field3)>} Sales)