Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manipulate data coming from pytools #87

Closed
acabos91 opened this issue Jan 16, 2020 · 3 comments
Closed

Manipulate data coming from pytools #87

acabos91 opened this issue Jan 16, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@acabos91
Copy link

Hi,

To start, thank you for your really good job on this tools. It is very useful.
My issue is that I cannot made operation on objects calculated with Python.
I have some simple cases to explain :

  • I can calculate season, holiday and trend composant thanks to Pytools, I want to calculate noise. It is only (in additive model). Data minus season minus holiday minus trend. But I cannot do that directly in Qlik.
  • I made a forecast month by month of turnover of a market, and I want to calculate turnover of the next year but I cannot add the future 12 month directly in Qlik.

I don't want to do that into the script because main goal of this sheet (for our business) is that the client choose his parameter and see its forecast / decomposition. So pre-calculate induce a very heavy application (without this our apps are an average weight of 1 GB).

So it is possible to do operation such as Pytools.prophet(...) + Pytools.prophet or - Sum() etc ...
And also handle data, aggregate data from month (calculate result year, evolution, standard deviation ...)
Maybe it is already possible with some tips, but I cannot find it, I try to use Aggr for example but it is not working.

Thank you for your help
Best regards,
Anthony Cabos

@acabos91 acabos91 added the enhancement New feature or request label Jan 16, 2020
@nabeel-oz
Copy link
Owner

Hi Anthony,

Thanks, glad you've found this extension useful.

  • I can calculate season, holiday and trend composant thanks to Pytools, I want to calculate noise. It is only (in additive model). Data minus season minus holiday minus trend. But I cannot do that directly in Qlik.

This sounds like you want to calculate the 'residuals' between the predictable components and the actual values, which as mentioned by Prophet's author here can be calculated as y - yhat.

I included a quick change in release 6.4 published today which returns this result for the historical periods. Simply pass return=residual in the additional arguments to the PyTools.Prophet function.

PyTools.Prophet([Month Start], Sum(Attendances), 'freq=MS, return=residual')

The calculation could also be done in Qlik using the Column function. You would need to have Actual and Forecast as measures in the chart, and then use Column(1) - Column(2) to get the residuals.

  • I made a forecast month by month of turnover of a market, and I want to calculate turnover of the next year but I cannot add the future 12 month directly in Qlik.

I don't understand this case. Can't you just add future months to the data model using the forecast calendar approach explained in the usage documentation?

Cheers,
Nabeel

@acabos91
Copy link
Author

Hi Nabeel,

Sorry about the delay.
And thank you for your precise answer.
This change on the return is perfect, this is exactly what I want.
For the other, I was not able to made operation of results coming from Pytools.
But now I can made operation thanks to Aggr. I misunderstood how to use it with Pytools.

Thanks again for your answer,
Regards
Anthony

@nabeel-oz
Copy link
Owner

Great, glad you've got it working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants