Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi All,
How we can write OR condition in set analysis.
Sum({$<[Distribution Channel Desc]={'A','B','C'} or ([Distribution Channel Desc] = {'D'} and customerno = {'1','2','3'})>} Sales)
Thanks
 MK_QSL
		
			MK_QSL
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		SUM({$<[Distribution Channel Desc]={'A','B','C'}>*<[Distribution Channel Desc] = {'D'},customerno = {'1','2','3'} >}Sales)
 
					
				
		
Try:
Sum({<[Distribution Channel Desc]={'A','B','C'}>+
<[Distribution Channel Desc] = {'D'} , customerno = {'1','2','3'})>} Sales)
Marc.
 
					
				
		
what is the important of * here
 
					
				
		
 simondachstr
		
			simondachstr
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		* is an intersection that returns a set consisting of the records that belong to both operands (typical AND)
I believe a Union + would be more appropriate in this case.
SUM({$<[Distribution Channel Desc]={'A','B','C'}>+<[Distribution Channel Desc] = {'D'},customerno = {'1','2','3'} >}Sales)
 
					
				
		
 perumal_41
		
			perumal_41
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Try below expression
SUM({$<[Distribution Channel Desc]={'A','B','C'}>+<[Distribution Channel Desc] = {'D'},customerno = {'1','2','3'} >}Sales)
 ashfaq_haseeb
		
			ashfaq_haseeb
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		+ for Union * For Intersection
Go with this
Sum({<[Distribution Channel Desc]={'A','B','C'}>+
<[Distribution Channel Desc] = {'D'} , customerno = {'1','2','3'})>} Sales)
Check the attached document for more details
Regards
ASHFAQ
 Kushal_Chawda
		
			Kushal_Chawda
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try
SUM({$<[Distribution Channel Desc]={'A','B','C'}>+<[Distribution Channel Desc] = {'D'},customerno = {'1','2','3'} >}Sales)
 
					
				
		
 perumal_41
		
			perumal_41
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi
Try this
Sum({$<GIDRDDNullFlag = {'0'},[Business Segment] = {'Power Components','Power Equipment'},
[Suspension Flag - MM]={'#'},Pole={'NA'},[Item Category]={'*'} -{'ZSPK','ZSK1'},newDueIndicator={'1.OVD'},
[PSI Code]={'*'} - {'S11'},[Sold To No]={'*'} - {'9950016'},[Distribution Channel Desc]={'Distribution','Other','Direct'} > +
<GIDRDDNullFlag = {'0'},[Business Segment] = {'Power Components','Power Equipment'},
[Suspension Flag - MM]={'#'},Pole={'NA'},[Item Category]={'*'} -{'ZSPK','ZSK1'},newDueIndicator={'1.OVD'},
[PSI Code]={'*'} - {'S11'},[Sold To No]={'*'} - {'9950016'}, [Distribution Channel Desc] = {'Intercompany'},[Sold To No] = {'9465653','9465654','9465655','9465716','9465718','9465720'}>}
} sales)
 rubenmarin
		
			rubenmarin
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi, maybe using different sum is easier:
Sum({$<GIDRDDNullFlag = {'0'},[Business Segment] = {'Power Components','Power Equipment'},
[Suspension Flag - MM]={'#'},Pole={'NA'},[Item Category]={'*'} -{'ZSPK','ZSK1'},newDueIndicator={'1.OVD'},
[PSI Code]={'*'} - {'S11'},[Sold To No]={'*'} - {'9950016'},[Distribution Channel Desc]={'Distribution','Other','Direct'}>} sales)
+ Sum({$<GIDRDDNullFlag = {'0'},[Business Segment] = {'Power Components','Power Equipment'},
[Suspension Flag - MM]={'#'},Pole={'NA'},[Item Category]={'*'} -{'ZSPK','ZSK1'},newDueIndicator={'1.OVD'},
[PSI Code]={'*'} - {'S11'},[Sold To No]={'9465653','9465654','9465655','9465716','9465718','9465720'}, [Distribution Channel Desc] = {'Intercompany'}>} sales) 
