Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi all,
Quite new to Qlik so bear with me if this is an easy one. I have data that looks like this:
| Unique ID | Customer | Region | Attribute 1 | Attribute 2 | Attribute 3 | Flag 1 | Flag 2 | Flag 3 | 
|---|---|---|---|---|---|---|---|---|
| 1 | A | E | a | a | b | Y | N | Y | 
| 2 | A | G | c | d | e | N | N | Y | 
| 3 | B | F | c | d | b | N | N | N | 
| 4 | C | F | c | c | c | Y | Y | N | 
| 5 | D | G | d | f | d | N | N | N | 
The flags are created in the script editor using logical statements based on Attributes 1, 2 and 3 (it might be more attributes in my actual data set).
e.g. Flag 1 = Y if Attribute 1 = Attribute 2
Flag 2 = Y if Attribute 2 = Attribute 3
Flag 3 = Y if Attribute 2 < Attribute 3
I am able to create a stacked bar chart that counts the 'Y' (excluding the 'N') per Flag and per Region. However, what I would like achieve is the flag being as well as the region being reflected in the current data selection upon clicking on a given flag's count for a given region.
Hope this makes sense. Thanks for your help.
 
					
				
		
 jyothish8807
		
			jyothish8807
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Camilie,
Is this what you are looking for ? (ref attached)
A:
CrossTable(Flag, Data, 6)
LOAD [Unique ID],
Customer,
Region,
[Attribute 1],
[Attribute 2],
[Attribute 3],
[Flag 1],
[Flag 2],
[Flag 3]
FROM
[https://community.qlik.com/thread/303789]
(html, codepage is 1252, embedded labels, table is @1);
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I am not entirely sure I understand, but I think you might need The Crosstable Load function to transform your data and then create your chart
 
					
				
		
 jyothish8807
		
			jyothish8807
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Camilie,
Is this what you are looking for ? (ref attached)
A:
CrossTable(Flag, Data, 6)
LOAD [Unique ID],
Customer,
Region,
[Attribute 1],
[Attribute 2],
[Attribute 3],
[Flag 1],
[Flag 2],
[Flag 3]
FROM
[https://community.qlik.com/thread/303789]
(html, codepage is 1252, embedded labels, table is @1);
 
					
				
		
Thank you! However, upon drilling into the data (e.g. clicking on the graph) it doesn't reflect the 'Y' of a given flag in the current selection.
 
					
				
		
 jyothish8807
		
			jyothish8807
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Camille,
Yes, it will not be displayed in current selection box because we are hard coding the cart to always show only the 'Y' values.
One way could be to add "Data" also in the dimension. Then when you click twice on the bar, you can see Y also as selected.
Br,
KC
