I need to calculate the trend of a variable. I have this kind of data:
JAN FEB MAR APR MAY JUN
100 80 90 120 110 70
I need to know what's the trend of the last six months. In Qlik, if it is positive I'll have a up arrow, if it's negative I have to rappresent a down arrow. So I don't have to rappresent a chart, only to know the function to calculate the trend.
This function calculate the angular coefficient in a bivariate regression, that means that if the value is negative, the coefficient of the interpolate is negative, viceversa, it's positive (for not statistical people, "trend").
The problem is that your data are bivariate, but one is not a quantitative variable, but a qualitative one, the names of the months.
You ought transform the months in numbers, and calculate the coefficient between the two variables. Here the "new" data.
Then you can calculate the linest_m(value, value2) and add any conditional symbol as up or down arrows.
Be aware that it could be tricky forcing a dimension as a measure.