Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
YoussefBelloum
Champion
Champion

All values excluded when value selected

Hi guys,

I'm not able to do something,

you can find attached the QVW

i have one column "dimension" and two listbox's with one expression each, like this:

=if(not Match(dimension,'a 1','b 1','c 1','d 1','e 1','f 1','g 1'), dimension) => for the first listbox


=if(not Match(dimension,'a','b','c','d','e','f','g'), dimension) => for the second listbox


for example, when i select a value on the first listbox, all the values for the second listbox goes grey (excluded).

i just to be able to select values on both listboxes.

PS: there is solutions on the script, but i want to do it with chart expressions (if it is possible)

Thanks


29 Replies
sunny_talwar

Try this expression

=Sum({$<dimension -= {'a 1','b 1','c 1','d 1','e 1','f 1','g 1'}>+AS<dimension -= {'a','b','c','d','e','f','g'}>}amount)

Capture.PNG

pradosh_thakur
Master II
Master II

What about this ?

Learning never stops.
sunny_talwar

Also, selection in both should work

Capture.PNG

YoussefBelloum
Champion
Champion
Author

i think we are almost good, i just want this:

when i select 'a' on the first listbox, just see 'a' on the table, same  when i use the second listbox only

sunny_talwar

Isn't that is what we are seeing? When 'a' is selected, we are only seeing 'a' from inherited state?

sunny_talwar

May be this

=If(GetSelectedCount(dimension) > 0 and GetSelectedCount(dimension, FALSE(), 'AS') > 0,

Sum({$<dimension -= {'a 1','b 1','c 1','d 1','e 1','f 1','g 1'}>+AS<dimension -= {'a','b','c','d','e','f','g'}>}amount),

If(GetSelectedCount(dimension) > 0 and GetSelectedCount(dimension, FALSE(), 'AS') = 0,

Sum({$<dimension -= {'a 1','b 1','c 1','d 1','e 1','f 1','g 1'}>}amount),

If(GetSelectedCount(dimension) = 0 and GetSelectedCount(dimension, FALSE(), 'AS') > 0,

Sum({AS<dimension -= {'a','b','c','d','e','f','g'}>}amount), Sum(amount))))

YoussefBelloum
Champion
Champion
Author

What a mess ! Thank you

YoussefBelloum
Champion
Champion
Author

wasn't expecting something complicated like this, but i will use this

sunny_talwar

Well, things get messy when you don't want to resolve them in script

YoussefBelloum
Champion
Champion
Author

Definitely...