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 Capture.PNG](https://community.qlik.com/t5/image/serverpage/image-id/49113i5C8D8FA7BB2F8542/image-size/large?v=v2&px=999)
when filtered on a fueltype & countrycode, the correct amount is calculated for that section:
![Capture2.PNG Capture2.PNG](https://community.qlik.com/t5/image/serverpage/image-id/49114iC772C19D42508ADC/image-size/large?v=v2&px=999)
Thanks for your help