Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 koushik_btech20
		
			koushik_btech20
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Everyone,
I have a demo data and app where I have Actual and Budget data. I need the last expression total (sum of Rows) value in a textobject. Is it possible through expression label or any if other way out is there ?
Regards,
Koushik
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be try this
Sum(Aggr(fabs($(expr_Actual)-$(expr_Budget)), $(='[' & GetCurrentField(TimeDim) & ']')))
 stabben23
		
			stabben23
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
use this Expression in textbox
=sum(aggr(fabs(sum(Actual)-sum(Budget)),Date))
 stabben23
		
			stabben23
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		or this if you want same format:
num(sum(aggr(fabs(sum(Actual)-sum(Budget)),Date)),'#,##0')
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This might work also, if you have one value per day for Actual and Budget
=Sum(Fabs(Actual - Budget))
If not, then go with stabben23's solution
 stabben23
		
			stabben23
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		It does stalwar1, and its of course a better solution than mine.
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Well this might just be some mocked up data and it might not work in real scenario. But ya def worth checking because it would be a good idea to avoid Aggr() if we can.
 stabben23
		
			stabben23
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		agree, aggr should be avoid if possible.
 koushik_btech20
		
			koushik_btech20
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Based on Steffan solution I was trying to resolve but getting 0 where in dimension I am using TimeDim cyclic group and actual and budget this two expressions I am storing in a variable which I am referring.
I am using below expression,
sum(aggr(fabs($(expr_Actual)-$(expr_Budget)),GetCurrentField(TimeDim)))
 stabben23
		
			stabben23
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
I dont know why you are using GetCurrentField in a textbox?
try Without that,
or Sum(Fabs($(expr_Actual)-$(expr_Budget)))
 koushik_btech20
		
			koushik_btech20
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		It's throwing an error as nested aggregation not allowed.
