Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 ferha_jafri
		
			ferha_jafri
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello Everyone,
I need help in writing an expression in which I want exclude POL1,POL3,POL4 for location 3704 in a way that I should get the remaining one. Eg total mailpiece count is 9 and exclusion is 2 so and should be 7. Attaching the sample.
Thanks in advance
Ferha Sharma
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		If you exclude POL1,POL3,POL4 and sum it, it actually sums for rest (selected in screenshot 1) of the Pre_Adv_Customer which is like in case 1 in screenshot that doesn't give you 7. If you fix the selection of Omc_location_id to '3704' then the sum becomes 1( screen shot 2), because only one from rest members of Pre_Adv_Customer is relevant to it (refer 2 and 3).
 
 
Hope this helps.
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Which expression are you working on?
 ferha_jafri
		
			ferha_jafri
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		=sum({<Omc_Location_Id={$(=Concat({<Pre_Adv_Customer-={$(vCustomer_Not)}>}Location_Not,','))}>}Mailpiece_Count)
I want to write an expression in a way that it give me a result of 7 as 9 -2 =7
 antoniotiman
		
			antoniotiman
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Ferha,
maybe
=sum({<Location_Not={'3704'},Pre_Adv_Customer={'POL1*','POL3*','POL4*'}>} Mailpiece_Count)
Regards,
Antonio
Where we need to look? I mean which sheet? Which object?
 ferha_jafri
		
			ferha_jafri
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		sheet 2 and object table , expression is mentioned above.
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		If you are only looking for output '7' then try like:
=Sum({1}Mailpiece_Count) -
Sum({<Pre_Adv_Customer-={"$(=Only({<Omc_Location_Id={3704}>}Notcus))"}>}Mailpiece_Count)
Note: The logic you are assuming to exclude the field values and get the output is not correct, because the values are not mutually exclusive against other field values.
 ferha_jafri
		
			ferha_jafri
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		yes that is correct but my condition is I want to get 7 without implementing a condition as sum(mailpiececount)-sum({<Location_Not={'3704'},Pre_Adv_Customer={'POL1*','POL3*','POL4*'}>} Mailpiece_Count) as 9-2=7 ,
I want to write  a expression as one to get the result.
 antoniotiman
		
			antoniotiman
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Can You explain why result is 7 ?

Edit : my expression is
=sum({<Location_Not={'3704'},Pre_Adv_Customer-={'POL1*','POL3*','POL4*'}>} Mailpiece_Count)
 ferha_jafri
		
			ferha_jafri
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		because I want to exclude it , so the sum of mailpiececount is 9 and the condition will give 2 so the ans is 7
