Quantcast
Channel: SCN : All Content - SAP BusinessObjects Design Studio
Viewing all articles
Browse latest Browse all 4216

Design Studio 1.4: Plotting a time series and a trend line

$
0
0

My goal is to plot a time series and the corresponding linear trendline in Design Studio. The data source is an calculation view in HANA. The trendline is calculated by a linear regression model. The problem is that the time series changes dependent on the user’s cascading selection of subcategories of the dataset e.g. via listboxes. 

 

The scenario could be: plot the turnover over time and

  1. select the country(ies) and
  2. then the product category(ies) that are sold in the country(ies) selected in I.).

 

Example1 (here with 2 listboxes and the selected categories highlighted in blue)

Unbenannt46.png

 

Example 2

Unbenannt45.png

 

 

There are so many possible combinations of Countries and Product categories that the regression cannot be calculated in advance. The calculation needs to be done given the selction of the user. How can I solve that?

 

As a Design Studio novice I have two ideas that do not work:

 

  1. Calculate the intercept and the slope of the line like it is shown here: http://en.wikipedia.org/wiki/Simple_linear_regression#Fitting_the_regression_line

          Then plot the line in Design Studio. That sounds simple, but there are two problems.

  • I do not know how to plot the line over the time series even when I know the intercept and the slope of the line as constant values.
  • This is not a good longterm solution. I could not do any other more complex calculations like an ARIMA model.

 

     2. Each time the user makes changes to his selection, a new calculation of the regression in HANA is triggered. The calculation view in HANA will fill the table/data source for the Design Studio with a new  vector that is plotted as a new trend line.

 

That sounds professional, but  I am unable to achieve that. I need to pass the selected variables to HANA in a way similar to the solution posted by James Rapp here: http://scn.sap.com/message/15228380#15228380

 

This does not work for me. I cannot generate dynamic variables and pass them to the calculation view in HANA. Probably I am missing something.

I am wondering because this seems to me like a fairly standard problem and I could not find any out of the box solution. I would be very thankful for your help!


Viewing all articles
Browse latest Browse all 4216

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>