Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi Experts,
I have a very simple set analyis which is not working.
=Count({$<%ERDAT ={$(=max(%ERDAT))}>} Delivery.MATKL)
Can you please let me know what is wrong with this?
Regards
Jeba
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Is %ERDAT a date field??? If it is then try this:
=Count({$<[%ERDAT] ={"$(=Date(Max([%ERDAT]), 'DateFieldFormatHere'))"}>} Delivery.MATKL)
 
					
				
		
 lironbaram
		
			lironbaram
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		=Count({$<%ERDAT ={'$(=max(%ERDAT))'}>} Delivery.MATKL)
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this may be:
=Count({$<[%ERDAT] ={"$(=max([%ERDAT]))"}>} Delivery.MATKL)
 
					
				
		
 oknotsen
		
			oknotsen
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Some symbols and the use of spaces can cause problems.
You can usually bypass these by either not using those or putting the parts with spaces and symbols in square brackets.
 
					
				
		
Hi Liron and Sunny,
Still its not working 
42224 is the output in the textbox when I use max(%ERDAT).fyi.
Regards
Jeba
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Is %ERDAT a date field??? If it is then try this:
=Count({$<[%ERDAT] ={"$(=Date(Max([%ERDAT]), 'DateFieldFormatHere'))"}>} Delivery.MATKL)
 
					
				
		
Hi Sunny,
Still no success.
Count({$<[%ERDAT] ={"$(=Date(Max([%ERDAT]), 'MM/DD/YYYY'))"}>} Delivery.MATKL)
May be you can help me in alternative way if I provide my requrirements.
I am designing a NPrinting report with a straight table.Hence my straight table shoule always have yesterdays data(based on ERDAT).On Mondays it should consider Friday's date.
Is there a easy way other than the above set analysis?
Thanks & Regards
Jeba
 
					
				
		
if you want last day (friday when max(ERDAT)=monday) you Need to use
=FirstWorkDate(max(%ERDAT),2)
try this
Count({$<[%ERDAT]={'=$(=FirstWorkDate(max(%ERDAT),2))'}>}Delivery.MATKL
 
					
				
		
Hi Rudolf,
Thanks for the guidance.
Initially I was trying the same expression and it didn't worked.
Now I am trying to achive the count based on maxdate and then using the Firstwork date.
Unfortunately both are not working
Regards
Jeba
 
					
				
		
Hi,
Maybe try this:
=Count({$<[%ERDAT] ={"$(=Date(Max([%ERDAT]),'MM/DD/YYYY'))"}>} Delivery.MATKL)
