Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 kbhasinptc
		
			kbhasinptc
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I have two fields in data Id and sales. I am trying to take sum of sales for maximum value of ID but it is giving me sum only for 1 maximum id value which is at the last. the expression I am using is as below:
Sum({$<id={"$(=max(id))"}>}sales)
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be you need this
FirstSortedValue(Aggr(Sum(Sales), id), -id)
 
					
				
		
 devarasu07
		
			devarasu07
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
method 1:
=FirstSortedValue(ID,-Sales)
method 2:
=max(aggr(sum(Sales),ID))
 
					
				
		
 vishsaggi
		
			vishsaggi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Also try this May be?
= Max(Aggr(Sum(Sales), Id))
 shiveshsingh
		
			shiveshsingh
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Max(aggr(sum(sales),ID))
 isingh30
		
			isingh30
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Please check the screenshots.
Let me know.
Thanks.
