Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I have a text object with a set analysis expression
sum({<Type={"*SAVBU*"}>} Value))
and a list box with items 'SAVBU A' and 'SAVBU B'
The issue is if I click one of the item from List box, the values in Text object does not change...is it becuse I locked the expression under SAVBU*?...How am I able to select an item from the list box and at the same time change the values.
Tks.
Union is not the right one (it will always lead to all *SAVBU* items), you should use intersection between the set you specify between {} and the set of selected values:
=sum({<Type*={"*SAVBU*"}>} Value))
will intersect the explicit set of *SAVBU* values from the set expression with whatever you have selected from the lmist box. If you select nothing (all list values white) the complete set of *SAVBU* values will be used. If you select a single one, only that one will be used. If you select none of them (e.g. select another value like "ABCDEF" from the list box, turning all *SAVBU* items into grey) the result will be 0.
Change your expression to sum({<Type+={"*SAVBU*"}>} Value)
This (the plus sign) will make an union of your current selections with the set analysis.
Eduardo
Hi! Eduardo,
Thank you for your time.
I tried adding the + sign but the text object gives me the total for all items in Type field. I only want to show the total value of the 2 items SAVBU A and B. And when I tried to click the item on A or B in the list box, it gives me the total for both A and B.
Tks.
When you use a field in set analysis it suprsedes the selection you made in that field elsewhere. Using the union
you shows both the filtered by set analysis and elsewhere.
What I understood, from your last post, is that you want the selection to supersed the set analysis. I don't know if this is possible, unfortunately.
Eduardo
Eduardo,
What's weird is that my other list boxes works except for the Type list box. Not sure if this has something to do with my field expression in Type field
IF(Type = 'SAVBU A' or Type = 'SAVBU B',Type )
Bur this is what I did to my other list boxes and they worked except for the Type list box.
Tks.
But in the other list boxes, were you using in the set analysis the same field as in the list box? If you use different fields between the list box and the set analysis you won't have this problem.
Eduardo
Union is not the right one (it will always lead to all *SAVBU* items), you should use intersection between the set you specify between {} and the set of selected values:
=sum({<Type*={"*SAVBU*"}>} Value))
will intersect the explicit set of *SAVBU* values from the set expression with whatever you have selected from the lmist box. If you select nothing (all list values white) the complete set of *SAVBU* values will be used. If you select a single one, only that one will be used. If you select none of them (e.g. select another value like "ABCDEF" from the list box, turning all *SAVBU* items into grey) the result will be 0.
Peter is correct, you may receive a syntax error but it still works
