# How to calculate statistical funtion – TREND in Quantrix?

Hi,

Use the **Forecast**() function instead. For example, see this illustration.

*

Good luck

S A U Posted new comment October 16, 2020

S A U commented

It will be easier to help you if you attach a QM file indicating both the actual data and the period for the forecast data.

Thanks a lot for the help. I try it, and it works the same as Trend function in Excel, but now I have another problem 🙁

I dont know how to calculate with “forecaste” when “dependent_value” are from two mounts (ex. 29.04.2020; 30.04.2020; 01.05.2020; 02.05.2020; 03.05.2020)

ex: forecast(x; dependent_value; independent_value)

if I wont to forecast for the date 04.05.2020, then

x = 04.05.2020

dependent_value = (ex. 0,1; 0,2; 0,3; 0,4; 0,5)

independent_value = 29.04.2020; 30.04.2020; 01.05.2020; 02.05.2020; 03.05.2020

I dont know how to select them when they are in two diferent mounths ?