Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Query on Slope-Based Sales Trend Analysis in OAC

Received Response
31
Views
5
Comments

Hi Team,

We have a requirement to identify customers whose sales have declined over a specific period in the last one year. Essentially, we need to compare the last 12 months of sales data and determine the trend — similar to how the SLOPE function works in Excel.

Could you please confirm if Oracle Analytics Cloud provides any built-in functionality for this type of analysis? Additionally, do we have any extensions or sample reports available for this scenario?

Thanks,
Jay

Answers

  • Brendan T
    Brendan T Rank 6 - Analytics & AI Lead

    You can add overlay, projections, forecasting and reference lines to charts, and for other types of analytics https://docs.oracle.com/en/cloud/paas/analytics-cloud/acubi/enhance-visualizations-statistical-analytics.html#GUID-530477EB-EF4F-40FA-9131-F0E50F0C2506

  • Jayakumar Perumal
    Jayakumar Perumal Rank 3 - Community Apprentice

    Hi Brendan,

    Thanks for the quick response. We have data for hundreds of customers to compare — will this chart help us identify the declining sales customers efficiently?

    Thanks,
    Jay

  • Gianni Ceresa
    edited Oct 29, 2025 1:46PM

    The SLOPE function in Excel doesn't do anything magically, it's a documented simple calculation on a dataset with 2 values (referred as X and Y):

    image.png

    Take each x value, subtract the average of all the x's values, multiply by each y value subtracting the average of all the y's values. Sum all that together and divide by the sum of each x value subtracted the average x squared. There is your slope value.

    You can therefore calculate that in OAC because OAC is able to calculate the average in a dataset, it is able to perform subtraction, multiplication and division. And it can also perform sum aggregation across a dataset.

    There isn't a native function doing that, but you don't need it because the function itself is just a combination of simpler operations.

    If you have hundreds of customers and want this value to be calculated all the time and take actions based on it, you can also materialize it in your data source: it will be calculated once and stored, making it faster to perform analysis on it.

  • Gianni Ceresa
    edited Oct 29, 2025 1:54PM

    And going in the direction hinted by Brendan: the FORECAST function let you easily forecast future sales by customer based on past data ( https://docs.oracle.com/en/cloud/paas/analytics-cloud/acubi/functions.html ).

    That could give you an added value than just the slope of the regression line, because the forecast could take into consideration a not linear trend and seasonality etc.

  • Jayakumar Perumal
    Jayakumar Perumal Rank 3 - Community Apprentice

    Thanks @Gianni Ceresa . i will try out your suggestions and update my results.