Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
My requirement is that I have 2 list boxes showing same fields. e.g. List Box 1: A,B,C,D,E. & List Box 2: A,B,C,D,E. So when I select A in List Box 1, the 'A' in listbox2 should get hidden or greyed out. Basically I have to do comparison of A vs B or A vs C or B vs C.
If the value that has been selected in ListBox1 is not disabled than user can select the same A from ListBox2 which does not make sense.
Hi,
is this the same requirement as in your thread need to show all the values in listbox 2 minus the value that is selected in List box 1
?
regards
Marco
Thanks a lot Sunny. Just one question. I don't understand why to we use aggr here. If you can please explain it to me it will be very helpful.
=Aggr(If(GetSelectedCount(Scenario) = 0, Only(Compare_Scenario), Only({<Compare_Scenario = e(Scenario)>} Compare_Scenario)), Compare_Scenario).
Yes it is the same one.
Thanks for your reply. That works too but in my context that will be a bit difficult to implement.
Hi,
Sunny stalwar1 has done it in awesome way!!!
Aggr function has been used here just to aggregate appropriate values in the second list box as per your requirement.
If no value is selected in Scenario (GetSelectedCount(Scenario) = 0) , the only values (Values corresponding to Compare_Scenario [all values ]->> ie. Only(Compare_Scenario) ) of Compare_Scenario will be populated in Compare_Scenario list box else the values excluded in Scenario list box will get populated in Compare_Scenario list box
The reason I had to use Aggr() here was because I wanted to use set analysis
=Aggr(If(GetSelectedCount(Scenario) = 0, Only(Compare_Scenario), Only({<Compare_Scenario = e(Scenario)>}Compare_Scenario)), Compare_Scenario)
The problem is that I cannot use set analysis without some kind of aggregation functions (Sum, Only, Min, Max, Median, Avg.....) and if I use any of them in my dimension, I need to use Aggr() function. So anytime you have to use set analysis in your dimension for any reason, remember to use Aggr() function.
Does that helps?
Best,
Sunny
you're welcome.
Glad it helped.
maybe you can close your other thread as well then:
Qlik Community Tip: Marking Replies as Correct or Helpful
thanks
regards
Marco