Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 louwriet
		
			louwriet
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi ,
I would really appreciate help with a complex Aggr that i use with set analysis.
I need to work out the fuel usage per delivery truck per route. At the end of the day i need to see what route is the most cost effective.
I have 3 sets of data that i concatenate to get one fact - transaction table. One is what is the value of the goods that the truck delivered. One is the expences of that truck - petrol/diesel and One is Route information - amount of kilometers per route.
Expression that is returning zero values to calculate Liter per trip :
sum(Aggr(sum({$<data = {'TRIP'}>} Total_km) / sum(Aggr(sum({$<data = {'TRIP'}>} Total_km) / sum({$<data = {'Expence'}, Exp_Type = {'petrol','diesel'} >} Value )) , Month, VehicleReg, Route ))
Month , VehicleReg and Route are my dimensions. When i use this aggr just to sum the Total_Km i get the correct answer but the data expence in the expression result in 0 values.
Thank so much
Louw
 
					
				
		
 louwriet
		
			louwriet
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I am just trying to upload the new demo model, just dont want to upload today. will try tomorrow again. Did a change to load script as well. I have split the sales and the trip data into two tables and now the real income calculation is also working.
Regards
