# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
Partner

## Trend analysis

Hi everybody,

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.

Thank you very very much for your help!

Tags (1)
Highlighted
Contributor III

## Re: Trend analysis

Hi Anna,

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.

[month,value,value2

jan,100,1

feb,80,2

mar,90,3

apr,120,4

may,110,5

jun,70,6

];

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.