Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 EliGohar
		
			EliGohar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi All,
I'm trying to count unique faces (FaceID field) which appeared both in “Left wing” and “Exit 1” Sources, this is a sample data:
if I’m using this expression:
count(distinct {$<[Source]={'Left Wing','Exit 1'}>} FaceID)I’ll get 2 (because it calculates faces which appeared in “Exit 1” or “Left Wing”)
I'm expecting to get 1 because only faceID 2190 appeared both in "Exit 1" and "Left Wing"
Thanks for the help,
Eli.
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Sorry my bad, try this instead
Count(DISTINCT {$<FaceID = P({<[Source] = {'Left Wing'}>}) * P({<[Source] = {'Exit 1'}>})>} FaceID)changed '+' (union) to '*' (intersection)
 
					
				
		
 lironbaram
		
			lironbaram
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		hi @EliGohar 
strange , have a look at the attach app ,
this expression work as expected 
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this
Count(DISTINCT {$<FaceID = P({<[Source] = {'Left Wing'}>}) + P({<[Source] = {'Exit 1'}>})>} FaceID) EliGohar
		
			EliGohar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		@sunny_talwar Thanks but it still counts faces which appeared in “Exit 1” or “Left Wing”.
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Sorry my bad, try this instead
Count(DISTINCT {$<FaceID = P({<[Source] = {'Left Wing'}>}) * P({<[Source] = {'Exit 1'}>})>} FaceID)changed '+' (union) to '*' (intersection)
 EliGohar
		
			EliGohar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		@sunny_talwar You Rock!
 EliGohar
		
			EliGohar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		@sunny_talwar I have another question:
I want to add another condition:
Count unique faces (FaceID field) which appeared both in “Left wing” and “Exit 1” Sources and not appeared in "Entrance 2" source.
Tried the following expression:
Count(DISTINCT {$<FaceID = P({<[Source] = {'Left Wing'}>}) * P({<[Source] = {'Exit 1'}>}) * P({<[Source] -= {'Entrance 2'}>})>} FaceID)
But no luck.
Any idea?
Thanks.
 
					
				
		
 lironbaram
		
			lironbaram
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		hi 
try this 
Count(DISTINCT {$<FaceID = P({<[Source] = {'Left Wing'}>}) * P({<[Source] = {'Exit 1'}>}) - P({<[Source] = {'Entrance 2'}>})>} FaceID) EliGohar
		
			EliGohar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 lironbaram
		
			lironbaram
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		hi @EliGohar 
strange , have a look at the attach app ,
this expression work as expected 
 EliGohar
		
			EliGohar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		@lironbaram Thanks!
