Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi,
I am working on an application, in which I need 2 listboxes with the same field. For example 'Fruit'.
So, in listbox1 a user may select Apple ; Pear ; Banana then I want another listbox, with the same field BUT kind of unlinked to listbox1. So that in the second listbox the user may select different fruits or one, for example : Orange
I need them unlinked because I want to show a chart, with 1 bar/symbol (expression) with the fruits selected in listbox1 and another bar/symbol with the other listbox (Orange) value selected.
I'm sure I've seen this done before, but not sure how to achieve it.
Any ideas?
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi beanz,
there are probably different kind of approaches for that. I could think of:
- using input boxes with variables and possible values prepulated and restricted by field fruits
or
- using multiple non linked fields created during load only for selection, like
LOAD Fruits as FruitSelect1
resident YOURFRUITTABLE;
LOAD Fruits as FruitSelect2
resident YOURFRUITTABLE;
In both cases, you might need to use something like used here:
http://community.qlik.com/message/146311#146311
e.g.
=Sum({$<Fruits={'$(=concat(FruitSelect1,chr(39)&','&chr(39)))'}>}Value)
to create your expression in the comapring chart.
Hope this helps,
Stefan
 its_anandrjs
		
			its_anandrjs
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Load list box some thing like
For 1.
If( Fruits= 'Apple','Pear','Banana', Fruits)
For 2
If( Fruits= 'Orange', Fruits)
Please confirm you want to laod from single field or it is different.
Regards,
Anand
 
					
				
		
Yes, it's 1 field called Fruit, but I want 2 different selections(listboxes) - With any number of fruits per listbox selected.
 its_anandrjs
		
			its_anandrjs
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Ok i understood for this load to list box
For 1.
=if (Wildmatch(Fruits, 'Apple' , 'Pear' , 'Banana' ), Fruits)
For 2.
=if (Wildmatch(Fruits, 'Orange' ), Fruits)
Regards,
Anand
 
					
				
		
I think that's on the right track, but not exactly what I'm looking for.
I've attached the sample .qvw at the top...to refer to.
So, basically I have 2 listboxes. Then a chart.
I want 2 expressions in the chart, one will just show values pertaining to the fruits selected in Listbox1, then the other expression(bar) will show values relating to listbox2.
It's a bit tricky.
 
					
				
		
I think this might be the solution : http://community.qlik.com/message/35086#35086
BUT I'm not sure what the last one is implying.
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi beanz,
there are probably different kind of approaches for that. I could think of:
- using input boxes with variables and possible values prepulated and restricted by field fruits
or
- using multiple non linked fields created during load only for selection, like
LOAD Fruits as FruitSelect1
resident YOURFRUITTABLE;
LOAD Fruits as FruitSelect2
resident YOURFRUITTABLE;
In both cases, you might need to use something like used here:
http://community.qlik.com/message/146311#146311
e.g.
=Sum({$<Fruits={'$(=concat(FruitSelect1,chr(39)&','&chr(39)))'}>}Value)
to create your expression in the comapring chart.
Hope this helps,
Stefan
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Attached a demo of approach #2.
Regards,
Stefan
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		In your cases something like
=Sum({$<Fruit= Fruit1>}Value)
seems to be really enough.
edit: new app
edited by swuehl
 
					
				
		
 richnorris
		
			richnorris
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Cant you just do:
tmpFruits:
LOAD
Fruits
FROM
fruits.qvd (qvd);
(Or, wherever you are getting your fruits from, sql database, whatever)
FinalFruits:
LOAD
Fruits AS Fruits1,
Fruits AS Fruits2
RESIDENT tmpFruits;
drop table tmpFruits;
then have a listbox showing 'Fruits1' and a listbox showing 'Fruits2', and then the table showing 'Fruits1' and 'Fruits2'
