1 Reply Latest reply: May 28, 2010 10:49 AM by Nuno Faustino RSS

    linest_m and aggr function issue

    Nuno Faustino

      Hi guys,

       

      I have a problem when i want to estimate the relationship between two variables with a linear relationship.

      I have two fields: MU and DETAILS and I wish to obtain a linear regression between the two by month (aggregation variable called MY).

      The first method I tried didn't work because I used the simple expression linest_m(MU,DETAILS) which didn't accomplish the MY aggregation part resulting in wrong values. I could however obtain a chart "sliced" by dimension and organize a top ten.

      Nevertheless, I got the formula working when i finally tried:

      linest_m(aggr(sum(MU),MY),aggr(sum(DETAILS),MY)) or linest_m(total aggr(sum(MU),MY),aggr(sum(DETAILS),MY))

      The values are correct with the latter formula, but somehow it's now impossible to "slice" these values by dimension in a chart (for instance, using Age Interval). It only shows the global value and to obtain each of the individual values, several selections have to be made in a list box.

      It's acceptable but not quite good for a visual side by side analysis in a chart.

      Is there any way to obtain a linear regression by month variable and then use in a chart/table (to get a top ten linest_m results)?

      Thanks in advance for your help!