Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a 50 variables, I want to do a Set analysis statement that says 'Ignore all except fields xyz'.
So rather than doing:
sum( {< var1=, var2=, var3=... var47=>} sales) -here the value will change only when selctions are made in var48, var49 or var50.
I want to be able to specify which 3 fields to Not-ignore, but ignore all others... so I only want to have to write var48, var49 and var50 in the set statement rather than writing out 47 exclusions.
I'm sure there must be an easy way to do this, I just can't make much sense of some of the documentation.
Any ideas?
Thanks
GPC
Hi gcampbell,
I would do that in that way :
sum( { 1< var48 = P(var48), var49 = P(var49), var50 = P(var50)>} sales)
With this solution, you're still not totally independent from your other variables : if selecting var47 reduce the possible values of var48 by association, only these values of var48 will be taken into account.
Another way is using alternate state syntax :
sum( { 1< var48 = $::var48, var49 = $::var49, var50 = $::var50>} sales)
Here the problem can be that your not associated anymore with the other variables... (if only one value of var48 is possible with the active selection, it still takes everything until you select that value)
Try the two, i hope one will help you for your case
Regards,
Thomas
Hi gcampbell,
I would do that in that way :
sum( { 1< var48 = P(var48), var49 = P(var49), var50 = P(var50)>} sales)
With this solution, you're still not totally independent from your other variables : if selecting var47 reduce the possible values of var48 by association, only these values of var48 will be taken into account.
Another way is using alternate state syntax :
sum( { 1< var48 = $::var48, var49 = $::var49, var50 = $::var50>} sales)
Here the problem can be that your not associated anymore with the other variables... (if only one value of var48 is possible with the active selection, it still takes everything until you select that value)
Try the two, i hope one will help you for your case
Regards,
Thomas
Use this
Sum({1-$<(var48 = P(var48), var49 = P(var49), var50 = P(var50)>} sales)
Hi Thomas,
This expression worked a treat:
sum( { 1< var48 = $::var48, var49 = $::var49, var50 = $::var50>} sales)
I have never seen this syntax before in a set. We have just upgraded to QV11 so alternate states is a new thing for us, please can you explain that syntax to me?
Thanks for you help.
G
You can create a new alternate state in the document propreties or in almost every object, even in a sheet propreties.
You can then create for exmaple two list box on your var48 field, on in the "default state", one in the "New State".
These two boxes will not be linked, and selection on the "New State" box will only affect object or sheet that are defined in that state. It can also affect object in the "default state" by using alternate state in the set analysis of expressions.
ex:
- sum({[New State]}sales) will show sales related to the selections made in the listboxes defined with the "New State".
- sum({<var48 = [New State]::var48>} will show sales for the "default state", except for var48 field for wich the selection in the "New State" is transferred.
$ is representing the "default state", so in the syntax of the above post, it's only transferring the selection in the "default state" into var48. It's not really an alternate state, only using the syntax.
I didn't used a lot alternate states since now, but it seems really powerful, especially for comparaison on two values of the same field (two list box in two distinct states, then expression using these states).
A problem is that the current selection box is also defined in 1 state, so you may need more than one that check all your selections...
I'm not sure it's clear, but if not you should find a lot of documentation on that (even in the Help menu, a few example...)
Thomas