<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Convert Advance Analytics Tool Box Expression to KPI Expression in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Convert-Advance-Analytics-Tool-Box-Expression-to-KPI-Expression/m-p/58186#M14210</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried your expression, but still not resulting into any value. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 May 2018 19:40:19 GMT</pubDate>
    <dc:creator>phaneendra_kunc</dc:creator>
    <dc:date>2018-05-09T19:40:19Z</dc:date>
    <item>
      <title>Convert Advance Analytics Tool Box Expression to KPI Expression</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Convert-Advance-Analytics-Tool-Box-Expression-to-KPI-Expression/m-p/58182#M14206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one help me to work below expression in KPI object? Below one is captured from "Console window in Chrome" which was produced from a "Analytics Tool Box extension" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;R.ScriptEvalExStr('N', 'save(q,file="~/debug_holt_winters.rda"); library(jsonlite);library(dplyr);library(forecast);data&amp;lt;-ts(na.omit(q$Measure) ,frequency=12);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fit&amp;lt;-HoltWinters(data, seasonal="additive" );&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; res&amp;lt;-forecast(fit, level=0.95, h=15);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; json&amp;lt;-toJSON(list(as.double(res$mean),as.double(res$upper),as.double(res$lower),list(fit$alpha, fit$beta, fit$gamma, fit$coefficients))); json;', Sum(Sales) as Measure)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works good in the Advanced Analytics Toolbox --&amp;gt; Time Series --&amp;gt; HoltWinters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Phani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2024 08:18:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Convert-Advance-Analytics-Tool-Box-Expression-to-KPI-Expression/m-p/58182#M14206</guid>
      <dc:creator>phaneendra_kunc</dc:creator>
      <dc:date>2024-11-16T08:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Advance Analytics Tool Box Expression to KPI Expression</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Convert-Advance-Analytics-Tool-Box-Expression-to-KPI-Expression/m-p/58183#M14207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.qlik.com/qlik-users/40441"&gt;phaneendra.kunche&lt;/A&gt;‌!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without looking further into the R-script itself my guess would be that you're trying to use a tensor function (since you're using ScriptEvalExStr) instead of an aggregation. KPI objects only allow a single value to be returned. Does your function return multiple values? If so, try using a line chart or similar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards, &lt;/P&gt;&lt;P&gt;Josefine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 07:47:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Convert-Advance-Analytics-Tool-Box-Expression-to-KPI-Expression/m-p/58183#M14207</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-07T07:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Advance Analytics Tool Box Expression to KPI Expression</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Convert-Advance-Analytics-Tool-Box-Expression-to-KPI-Expression/m-p/58184#M14208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are right, above expression returns multiple values. I'm looking to convert to a KPI expression where it results sum of forecast results for 15 future months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt; I have 2 years historical sales data by Year Month and using Holt Winters model, i want to plot the data data in a line chart, which i was able to do that using "&lt;A href="https://github.com/mhamano/advanced-analytics-toolbox"&gt;Analytics Tool Box&lt;/A&gt;" extension. But i need to show the sum of forecast results in a KPi object. I don't have to use the Analytics toolbox, just need an expression where it AGGREGATES using HOLT WINTERS model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Installed R Packages: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Rserve,ChainLadder,colorspace,caret,jsonlite,tseries,forecast,tm,dplyr,SnowballC,cluster,rpart,d3r,partykit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample QVF:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Attached&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; text-indent: 0in;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; text-indent: 0in;"&gt;Any&amp;nbsp; help would be greatly appreciated. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; text-indent: 0in;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-indent: 0in; font-size: 10pt;"&gt;Phani&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 17:31:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Convert-Advance-Analytics-Tool-Box-Expression-to-KPI-Expression/m-p/58184#M14208</guid>
      <dc:creator>phaneendra_kunc</dc:creator>
      <dc:date>2018-05-07T17:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Advance Analytics Tool Box Expression to KPI Expression</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Convert-Advance-Analytics-Tool-Box-Expression-to-KPI-Expression/m-p/58185#M14209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure exactly what you want to sum if it's the mean, upper, lower or other. But what I would do at first is to change the function to &lt;EM&gt;ScriptAggr&lt;/EM&gt; and second, remove the json part (which I think is only needed for the "Analytics Tool Box" extension). What you want there instead is the sum of your choice, as an example, I used "sum(res$mean)", which you should change according to your preference. Unfortunately, I haven't been able to test the code, but hopefully, this will help you going forward.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;R.&lt;STRONG&gt;ScriptAggr&lt;/STRONG&gt;('save(q,file="~/debug_holt_winters.rda"); library(jsonlite);library(dplyr);library(forecast);data&amp;lt;-ts(na.omit(q$Measure) ,frequency=12);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fit&amp;lt;-HoltWinters(data, seasonal="additive" );&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; res&amp;lt;-forecast(fit, level=0.95, h=15);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;sum(res$mean);&lt;/STRONG&gt;', Sum(Sales) as Measure)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards, &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Josefine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2018 07:42:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Convert-Advance-Analytics-Tool-Box-Expression-to-KPI-Expression/m-p/58185#M14209</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-08T07:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Advance Analytics Tool Box Expression to KPI Expression</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Convert-Advance-Analytics-Tool-Box-Expression-to-KPI-Expression/m-p/58186#M14210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried your expression, but still not resulting into any value. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2018 19:40:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Convert-Advance-Analytics-Tool-Box-Expression-to-KPI-Expression/m-p/58186#M14210</guid>
      <dc:creator>phaneendra_kunc</dc:creator>
      <dc:date>2018-05-09T19:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Advance Analytics Tool Box Expression to KPI Expression</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Convert-Advance-Analytics-Tool-Box-Expression-to-KPI-Expression/m-p/58187#M14211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phaneendra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a solution : replacing &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ScriptAggr &lt;/STRONG&gt;with&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; &lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;ScriptEval &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;and&lt;/SPAN&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt; aggr()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;aggr(&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;R.ScriptEval('&lt;/P&gt;
&lt;P&gt;library(forecast);&lt;/P&gt;
&lt;P&gt;data&amp;lt;-ts(na.omit(q$Measure) ,frequency=12);&lt;/P&gt;
&lt;P&gt;fit&amp;lt;-HoltWinters(data, seasonal="additive" );&lt;/P&gt;
&lt;P&gt;res&amp;lt;-forecast(fit, level=0.95, h=15);&lt;/P&gt;
&lt;P&gt;sum(res$mean);',&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Sum(Sales) as Measure),&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;YearMonth)&lt;/P&gt;



&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2018 08:11:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Convert-Advance-Analytics-Tool-Box-Expression-to-KPI-Expression/m-p/58187#M14211</guid>
      <dc:creator>yannick_c</dc:creator>
      <dc:date>2018-05-11T08:11:10Z</dc:date>
    </item>
  </channel>
</rss>

