Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 atlantis_shahri
		
			atlantis_shahri
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		
Hey guys, I need only the maximum dates for each Product in a table.
Like Bread 19/11/2017
Sugar 28/11/2017
Tea 18/11/2017
Tried something like this =Only({<PDate={'$(=max(Date))'}>} PDate) for Serial date 2. Didn't work.
Any kind of help is much appreciated and thanks in advance
Regards
Shahriar.
 
					
				
		
 settu_periasamy
		
			settu_periasamy
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Seems to be 'PDate' is not properly formatted.
Try this.
Table:
 
 LOAD Product,Date(Date#(PDate,'DD/MM/YYYY')) as PDate;
 
 Load * inline
 [
 Product, PDate
 Sugar, 11/11/2016
 Bread, 12/11/2016
 Sugar, 11/11/2017
 Bread, 12/11/2017
 Sugar, 12/10/2017
 Bread, 12/10/2017
 Sugar, 28/11/2017
 Bread, 19/11/2017
 Tea,  18/11/2017
 ];
 
Chart:
Dimension: Production
Expression :  Max(PDate)
 shraddha_g
		
			shraddha_g
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Can you share sample date?
What is the data present in PDate?
 atlantis_shahri
		
			atlantis_shahri
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This is the test source data.
Table:
Load * inline
[
Product, PDate
Sugar, 11/11/2016
Bread, 12/11/2016
Sugar, 11/11/2017
Bread, 12/11/2017
Sugar, 12/10/2017
Bread, 12/10/2017
Sugar, 28/11/2017
Bread, 19/11/2017
Tea, 18/11/2017
];
 shraddha_g
		
			shraddha_g
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Where is Date field from expression?
Only({<PDate={'$(=max(Date))'}>} PDate)
 shraddha_g
		
			shraddha_g
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try,
Only({<PDate={"$(=Date(max(PDate),'DD/MM/YYYY'))"}>} PDate)
 
					
				
		
 VishalWaghole
		
			VishalWaghole
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try below expression,
Dimensions is your product
Expression =Max(Total <Product> Date)
Thanks,
Vishal
 
					
				
		
 VishalWaghole
		
			VishalWaghole
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try below expression,
Dimensions is your product
Expression =Max(Total <Product> PDate)
Thanks,
Vishal
 
					
				
		
 settu_periasamy
		
			settu_periasamy
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Seems to be 'PDate' is not properly formatted.
Try this.
Table:
 
 LOAD Product,Date(Date#(PDate,'DD/MM/YYYY')) as PDate;
 
 Load * inline
 [
 Product, PDate
 Sugar, 11/11/2016
 Bread, 12/11/2016
 Sugar, 11/11/2017
 Bread, 12/11/2017
 Sugar, 12/10/2017
 Bread, 12/10/2017
 Sugar, 28/11/2017
 Bread, 19/11/2017
 Tea,  18/11/2017
 ];
 
Chart:
Dimension: Production
Expression :  Max(PDate)
 atlantis_shahri
		
			atlantis_shahri
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This doesn't work.
 atlantis_shahri
		
			atlantis_shahri
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This only works when Load Product,Date(Date#(PDate,'DD/MM/YYYY')) as PDate; is added. Thanks.
