Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 markgraham123
		
			markgraham123
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi all,
I'm a new learner in QlikView.
I was curious to know whether we can use Set analysis even sum/count/avg...etc functions were not used??
If so, can someone help me with a set analysis statement for:
If(ID='1', Name);
 
					
				
		
 Qrishna
		
			Qrishna
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You can use set analysis using only() function.
only() is the only non-aggregate function where set analysis can be used.
in your case.:
Only({$<ID={'1'}>}Name)
if you use this as dimension in any chart then:
aggr(Only({$<ID={'1'}>}Name),ListOfOtherDimensions)
edit:
hope that helps
Thanks
krishna
 kkkumar82
		
			kkkumar82
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Is this you want in a dimension or measure, let explain a little bit ur requirement, if possible with sample data.
Thanks
Kiran Kumar
 
					
				
		
 markgraham123
		
			markgraham123
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I was trying to do it in front end.
Simple If Statement
ID Name
1 A
2 B
3 C
If(ID='1', Name);
O/P: A
 kkkumar82
		
			kkkumar82
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I think you didn't catch me , where u want to have this if condition in a chart or text box ??
KK
 
					
				
		
 sasiparupudi1
		
			sasiparupudi1
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		you can not use set analysis on naked fields
it must be used in aggregations like sum/avg/count etc
hth
Sasi
 
					
				
		
 markgraham123
		
			markgraham123
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Sorry,
in chart.
 kkkumar82
		
			kkkumar82
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Graham,
For charts we can have calculated dimensions , there you can use such things but as Sasidhar told you cannot have a if condition for an expression but you can have like this
Sum(if(D='A', Value))
Please come up with some more data so that we can reach you.
Thanks
Kiran Kumar
 
					
				
		
 Qrishna
		
			Qrishna
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You can use set analysis using only() function.
only() is the only non-aggregate function where set analysis can be used.
in your case.:
Only({$<ID={'1'}>}Name)
if you use this as dimension in any chart then:
aggr(Only({$<ID={'1'}>}Name),ListOfOtherDimensions)
edit:
hope that helps
Thanks
krishna
 
					
				
		
 Qrishna
		
			Qrishna
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Any Luck?
 
					
				
		
 markgraham123
		
			markgraham123
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Krishna,
Thanq verymuch.
Actually, i did the same using "Only"
It worked. 
