Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi stevedark , here's in relation to my questions about buttons..
https://community.qlik.com/docs/DOC-4289?et=watches.email.document_comment#comment-62133
The questions are listed in one of the text box in the attachment.
...
 
					
				
		
 stevedark
		
			stevedark
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Janice,
You want to add this to your load script to set colour variables:
let vColNoHighlight = 'rgb(255,255,255)';
You then need to set calculated colours on the two buttons, to change the colour on click:
if(vShowChart = 'Prod Tablebox Chart', $(vColHighlight), $(vColNoHighlight))
and
if(vShowChart = 'Store Chart', $(vColHighlight), $(vColNoHighlight))
You can do expressions in the boxes such as this, these will then toggle:
=if(vShowChart = 'Prod Tablebox Chart', Count(DISTINCT {<[Store] = {'*ABC*'}>} [Product]), Count(DISTINCT {<[Store] = {'*ABC*'}>} [Store]))
The store count will always show 1 though?
The colour expression for those boxes should be based on the selection, like this:
=if(vShowChart = 'Prod Tablebox Chart', Count(DISTINCT {<[Store] = {'*ABC*'}>} [Product]), Count(DISTINCT {<[Store] = {'*ABC*'}>} [Store]))
And the action should set the value in a similar way:
=if(GetFieldSelections(Store) = '*ABC*', null(), '*ABC*')
Hopefully that gives you what you want? A solution is attached.
Steve
 
					
				
		
 stevedark
		
			stevedark
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Janice,
You want to add this to your load script to set colour variables:
let vColNoHighlight = 'rgb(255,255,255)';
You then need to set calculated colours on the two buttons, to change the colour on click:
if(vShowChart = 'Prod Tablebox Chart', $(vColHighlight), $(vColNoHighlight))
and
if(vShowChart = 'Store Chart', $(vColHighlight), $(vColNoHighlight))
You can do expressions in the boxes such as this, these will then toggle:
=if(vShowChart = 'Prod Tablebox Chart', Count(DISTINCT {<[Store] = {'*ABC*'}>} [Product]), Count(DISTINCT {<[Store] = {'*ABC*'}>} [Store]))
The store count will always show 1 though?
The colour expression for those boxes should be based on the selection, like this:
=if(vShowChart = 'Prod Tablebox Chart', Count(DISTINCT {<[Store] = {'*ABC*'}>} [Product]), Count(DISTINCT {<[Store] = {'*ABC*'}>} [Store]))
And the action should set the value in a similar way:
=if(GetFieldSelections(Store) = '*ABC*', null(), '*ABC*')
Hopefully that gives you what you want? A solution is attached.
Steve
