Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 19 Oracle Analytics Lounge
- 222 Oracle Analytics News
- 44 Oracle Analytics Videos
- 15.8K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 83 Oracle Analytics Trainings
- 15 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
Return regression details from TRENDLINE() function

Currently, the only two options for result_type are ('VALUE','MODEL'). If 'MODEL' is selected, it returns a long JSON string with the slope, intercept, some input parameters, and some regression metrics. This JSON string is not particularly usable in an OAC dashboard.
I would like to request the addition of more result_type options which return the details from the JSON 'MODEL' as numeric values:
- SLOPE
- INTERCEPT
- STD_ERROR
- R_SQUARED
Value
If I could extract the slope of the regression (at the level of partitionBy) then this calculation would become highly valuable for me in determining whether there is trending occuring in my data. Being able to return these metrics as numeric values enables sorting, filtering, and further calculations which are not possible today.
Example
I have a data set of power values for many devices which are categorized in platforms. I want to understand at the platform level if the average power of its racks is increasing, decreasing, or staying the same.
In other words, I am looking to fit a regression in order to calculate slope. When I use the TRENDLINE() function with result_type = MODEL, I can see the slope in the JSON. But this does not help me create a visualization or other columns because it is buried in the JSON.
I want to be able to enter the argument 'SLOPE' and have the highlighted numbers returned from the TRENDLINE() function as a numeric column which I could then sort and filter.
Comments
-
could you elaborate a little more on what you'd like to see with an example.
For example, are you proposing an addition result_type of 'SLOPE' and the return to be a number of some form, but do you need additional details and if so what
0 -
Thanks for submitting your idea. I've set it to Needs Votes so the community can vote on this idea.
1 -
@Brendan T I wanted to post the example but didn't realize that I could insert pictures. Thanks for pushing me to try copy/paste😆
What you described is exactly what I'm looking for. I've edited the description, let me know if this is clear.
FWIW, I think it would also be valuable to be able to return the intercept, std error, and R-squared. I have left these out of the scope of my idea as I have no specific use case for them at this time.1 -
I'd add those extras into the request (intercept, std error, R-squared). They might be used by most but they should be easy to add/included, with the benefit for those that need that level of detail
1