I've been tryng to configure a new metric using linear regression without any success( triyng to calculate the slope of the visits cumulative over time, but the linear regression slope function does'nt return something right - maybe I'm not putting the right thing on the X argument - I used visits, but I believe it should be time)
Could someone please share any exemples of linear regressions ?
Unfortunately, it's not really meant to work with time as the independent variable. It's for comparing two metrics, and time isn't a metric. That said, I think you can get what you want by using the cumulative function. It will only work if the dimension of your report is time, because it's not really time based, but rather "row number" based.
The idea is that we set a 1 on every row in the results, and then use cumulative to turn that into 1, 2, 3, ... Then that is used as the independent variable, and use visits (or any other metric, including cumulative visits) as the dependent variable. I have included a screen shot of the formula that I used as well as the exact same calculations in Excel. That way, you can see if it's going to work for your use case.