Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 stvn_003
		
			stvn_003
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello, I wonder what is the correct way to write this expression:
Count( {$<price_ok = {N} , date <= {Today()-7} >} pk_oc )
 maxgro
		
			maxgro
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		maybe this
Count( {$<ocd_precio_ok = {N}, occ_fentr = {"<=$(=Date(Today()-6,'DD/MM/YYYY hh:m:ss tt'))"} >} ocd_cmtrlsap)

 
					
				
		
 ramoncova06
		
			ramoncova06
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		this should do it 
Count( {$<price_ok = {'N'} , date = {"<=$(=Today()-7)"} >} pk_oc)
here more on set analysis A Primer on Set Analysis
 stvn_003
		
			stvn_003
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Maybe I'm doing something wrong because when I write this expression shows the number of matches
Count({$<ocd_precio_ok = {N} >} ocd_cmtrlsap)
but when I write this just another expression shows zero
Count( {$<ocd_precio_ok = {'N'} , occ_fentr = {"<=$(=Today()-7)"} >} ocd_cmtrlsap)
 maxgro
		
			maxgro
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		maybe you need to add a date or a date with the same format as occ_fentr
Count( {$<ocd_precio_ok = {N}, occ_fentr = {"<=$(=date(Today()-7))"} >} ocd_cmtrlsap)
 stvn_003
		
			stvn_003
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks Massimo
But, now two expressions show me the same result
Count( {$<ocd_precio_ok = {N}, occ_fentr = {"<=$(=date(Today()-7,'DD/MM/YYYY))"} >} ocd_cmtrlsap)
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Do you have data in the last 7 days for ocd_cmtrlsap? If not then both the expressions are correctly showing the same count because there is no data to be counted between 05/07/2015 and 05/13/2015. If you do have data then would you be able to share a sample application to check what is going wrong?
Best,
Sunny
 stvn_003
		
			stvn_003
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I have this information: ( ocd_cmtrlsap = Nro OC | occ_fentr = Fecha Entrega )

I want to count how many records there:
Count({$<ocd_precio_ok = {N} >} ocd_cmtrlsap)
and how many records were 7 days ago:
Count( {$<ocd_precio_ok = {N}, occ_fentr = {"<=$(=date(Today()-7,'DD/MM/YYYY))"} >} ocd_cmtrlsap)
But, now two expressions show me the same result, that is to say 6 rows
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You are missing a single quote after the date format here:
=Count( {$<ocd_precio_ok = {N}, occ_fentr = {"<=$(=Date(Today()-7,'DD/MM/YYYY'))"} >} ocd_cmtrlsap)
May be that will resolve the issue 
 
					
				
		
 ramoncova06
		
			ramoncova06
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		what happens when you only use Count({$<ocd_precio_ok = {'N'} >} ocd_cmtrlsap)
I am assuming that in your original expression you are actually getting a value because of the fact that you are not using the single quotes to define your constant to filter for ocd_precio_ok  
 stvn_003
		
			stvn_003
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Now it shows zero =(
