Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi everybody,
I Need to solve one Problem with useless Pivot-table-data.
I have a Pivot-table, which Shows all items, when there are items.
But I have docnums as well which have no items.

Now I wanted to hide the complete table, when no docnum is there to be shown.
I tried with a conditional Show, but this does not work.
IF(Count(distinct [docnum]) = 0,1)

Does somebody can help me with that Topic?
Thanks in advance.
Chris
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I think the table will be shown if the if() statement returns NULL, so you would need to explicitely return zero:
IF(Count(distinct [docnum]) = 0,0,1)
[and it's a show conditional, 1 is show chart, 0 is hide chart]
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Let's say one of your expression in this pivot table is Sum(Sales), you can try this as your layout condition:
Len(Trim(Sum(Sales))) > 0
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I think the table will be shown if the if() statement returns NULL, so you would need to explicitely return zero:
IF(Count(distinct [docnum]) = 0,0,1)
[and it's a show conditional, 1 is show chart, 0 is hide chart]
 
					
				
		
Hi Stefan,
thank you very much. It works now.
But I have a "Little" other issue now.
Now the table is hidden, when there is no docnum. Thats very good
But when I select nothing in qlikview the table is shown, because it "can have" lots of docnums
When nothing is selected in qlikview the table should be hidden too.
Do you have an idea?
Chris
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		What if you add another condition
If(Count(distinct [docnum]) = 0 or Len(Trim(GetCurrentSelections())) = 0, 0, 1)
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		IF(Count(distinct [docnum]) = 0,0,1) and not isnull(GetCurrentSelections())
 
					
				
		
Thanks everybody, it works now.
Chris
