Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Remco
Contributor III
Contributor III

Problem with aggr

Hello,

I am trying to calculate the slope & intersect with the linest_m function that works ok but I am always struggling with the aggr. Now, in the table I want the calculation to be done one each gradient COUNTRYCODE and FUELTYPE.  But now it does it over all. So, when I filter on a specific countrycode and fueltype, the calculation of linest_m is correct but how can I manage that the calculation takes place, without a filter placed, always between these dimensions?

 

The actual calculation is

 linest_m(total aggr(avg(AVGPERF) ,STEP),log(STEP))

 

and I assume that somehow I have to add the 2 dimensions in here. I tried all kind of possibilities but without luck.

 

Capture.PNG

when filtered on a fueltype & countrycode, the correct amount is calculated for that section:

 

Capture2.PNG

Thanks for your help

0 Replies