Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Dears,
How can I sum all the values of field B, only if field A is distinct.
In other words.
Collect all distinct values of field B, and sum its column A value.
Thanks per your attention,
Best regards,
 kaushiknsolanki
		
			kaushiknsolanki
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Would you please give an example for more clarification.
Regards,
Kaushik Solanki
 
					
				
		
Sum({<Distinct SN>} TotalLabor)
SN the number to be distinct
TotalLabor the number to be summed!
Thanks
 
					
				
		
Sum({<Distinct SN>} TotalLabor)
SN the number to be distinct
TotalLabor the number to be summed!
Thanks
 kaushiknsolanki
		
			kaushiknsolanki
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Could you please explain with example.
Regards,
Kaushik Solanki
 
					
				
		
 jagan
		
			jagan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
It is not possible, you need to arrive a flag for the first value in the script , so that you can directly sum up the values.
Can you please come up with sample data and example.
Hope this helps you.
Regards,
Jagan.
 
					
				
		
You probably already had solved this problem,however, recently I've tryied to solve that question and it was not too easy to be solved.
It could be solved with it:
sum(aggr(sum(DISTINCT B), A))
 
					
				
		
 deshikas
		
			deshikas
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Had the same issue your solution fixed for me. Thanks Luiz
