<?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 Using LinEst_M and RangeSum to get slope of cumulative data in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Using-LinEst-M-and-RangeSum-to-get-slope-of-cumulative-data/m-p/1983835#M81167</link>
    <description>&lt;P&gt;Hi there!&lt;/P&gt;
&lt;P&gt;I'm working in Qlik Sense on a prototype expression for a KPI item that returns the slope for cumulative claims rate of a product by months in service.&amp;nbsp; My production data and claims data to calculate the failure rate come from unrelated tables, so I use a synthetic dimension "Months in Service" to relate them.&amp;nbsp; I also plot the data on a log scale, so I transform "Months In Service" using log() for each month 1,2,3...etc In a straight table, RangeSum &amp;amp; Above functions return the cumulative failure rate by Months In Service, but I when I try to get the slope in my KPI by adding LinEst_M to those expressions, Qlik just returns 0.&amp;nbsp; As a test, I checked using LinEst_M for the failure rate data without accumulating with RangeSum and it works.&amp;nbsp; Does anyone know if this is just a syntax issue, or is it not possible to use RangeSum inside a LinEst expression?&amp;nbsp; Hope someone can help me solve it - thanks!!!&lt;/P&gt;
&lt;P&gt;A simplified version of my data looks like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Example Data for prototype expression" style="width: 495px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/89593i5795B229BEC1539A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Weibull Example Data.JPG" alt="Example Data for prototype expression" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Example Data for prototype expression&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This expression works (not cumulative):&lt;/P&gt;
&lt;P&gt;=sum(LinEst_M(total&lt;/P&gt;
&lt;P&gt;// "Y" - Claims Rate&lt;BR /&gt;Pick(Match(ValueLoop(1,4,1),1,2,3,4),&lt;BR /&gt;.02&lt;BR /&gt;,&lt;BR /&gt;.05&lt;BR /&gt;,&lt;BR /&gt;.04&lt;BR /&gt;,&lt;BR /&gt;.03&lt;BR /&gt;)&lt;BR /&gt;// "X" - Months in Service (log Scale)&lt;BR /&gt;, Pick(Match(ValueLoop(1,4,1),1,2,3,4),&lt;/P&gt;
&lt;P&gt;log(1)&lt;BR /&gt;,&lt;BR /&gt;log(2)&lt;BR /&gt;,&lt;BR /&gt;log(3)&lt;BR /&gt;,&lt;BR /&gt;log(4) &lt;BR /&gt;)))&lt;/P&gt;
&lt;P&gt;This one (cumulative) does not!&amp;nbsp; Any suggestions how to fix it, or is it a "no go" in Qlik sense for some reason?&lt;/P&gt;
&lt;P&gt;=sum(LinEst_M(total&lt;/P&gt;
&lt;P&gt;//"Y" - Cumulative Claims Rate&lt;BR /&gt;RangeSum(Above(Pick(Match(ValueLoop(1,4,1),1,2,3,4),&lt;/P&gt;
&lt;P&gt;.02&lt;BR /&gt;,&lt;/P&gt;
&lt;P&gt;.05&lt;BR /&gt;,&lt;/P&gt;
&lt;P&gt;.04&lt;BR /&gt;,&lt;/P&gt;
&lt;P&gt;.03&lt;BR /&gt;&lt;BR /&gt;), 0, RowNo()))&lt;/P&gt;
&lt;P&gt;//"X" - Months in Service (log Scale)&lt;BR /&gt;, Pick(Match(ValueLoop(1,4,1),1,2,3,4),&lt;/P&gt;
&lt;P&gt;log(1)&lt;BR /&gt;,&lt;/P&gt;
&lt;P&gt;log(2)&lt;BR /&gt;,&lt;/P&gt;
&lt;P&gt;log(3)&lt;BR /&gt;,&lt;/P&gt;
&lt;P&gt;log(4)&lt;BR /&gt;&lt;BR /&gt;)))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Sep 2022 17:28:43 GMT</pubDate>
    <dc:creator>nerf13</dc:creator>
    <dc:date>2022-09-21T17:28:43Z</dc:date>
    <item>
      <title>Using LinEst_M and RangeSum to get slope of cumulative data</title>
      <link>https://community.qlik.com/t5/App-Development/Using-LinEst-M-and-RangeSum-to-get-slope-of-cumulative-data/m-p/1983835#M81167</link>
      <description>&lt;P&gt;Hi there!&lt;/P&gt;
&lt;P&gt;I'm working in Qlik Sense on a prototype expression for a KPI item that returns the slope for cumulative claims rate of a product by months in service.&amp;nbsp; My production data and claims data to calculate the failure rate come from unrelated tables, so I use a synthetic dimension "Months in Service" to relate them.&amp;nbsp; I also plot the data on a log scale, so I transform "Months In Service" using log() for each month 1,2,3...etc In a straight table, RangeSum &amp;amp; Above functions return the cumulative failure rate by Months In Service, but I when I try to get the slope in my KPI by adding LinEst_M to those expressions, Qlik just returns 0.&amp;nbsp; As a test, I checked using LinEst_M for the failure rate data without accumulating with RangeSum and it works.&amp;nbsp; Does anyone know if this is just a syntax issue, or is it not possible to use RangeSum inside a LinEst expression?&amp;nbsp; Hope someone can help me solve it - thanks!!!&lt;/P&gt;
&lt;P&gt;A simplified version of my data looks like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Example Data for prototype expression" style="width: 495px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/89593i5795B229BEC1539A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Weibull Example Data.JPG" alt="Example Data for prototype expression" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Example Data for prototype expression&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This expression works (not cumulative):&lt;/P&gt;
&lt;P&gt;=sum(LinEst_M(total&lt;/P&gt;
&lt;P&gt;// "Y" - Claims Rate&lt;BR /&gt;Pick(Match(ValueLoop(1,4,1),1,2,3,4),&lt;BR /&gt;.02&lt;BR /&gt;,&lt;BR /&gt;.05&lt;BR /&gt;,&lt;BR /&gt;.04&lt;BR /&gt;,&lt;BR /&gt;.03&lt;BR /&gt;)&lt;BR /&gt;// "X" - Months in Service (log Scale)&lt;BR /&gt;, Pick(Match(ValueLoop(1,4,1),1,2,3,4),&lt;/P&gt;
&lt;P&gt;log(1)&lt;BR /&gt;,&lt;BR /&gt;log(2)&lt;BR /&gt;,&lt;BR /&gt;log(3)&lt;BR /&gt;,&lt;BR /&gt;log(4) &lt;BR /&gt;)))&lt;/P&gt;
&lt;P&gt;This one (cumulative) does not!&amp;nbsp; Any suggestions how to fix it, or is it a "no go" in Qlik sense for some reason?&lt;/P&gt;
&lt;P&gt;=sum(LinEst_M(total&lt;/P&gt;
&lt;P&gt;//"Y" - Cumulative Claims Rate&lt;BR /&gt;RangeSum(Above(Pick(Match(ValueLoop(1,4,1),1,2,3,4),&lt;/P&gt;
&lt;P&gt;.02&lt;BR /&gt;,&lt;/P&gt;
&lt;P&gt;.05&lt;BR /&gt;,&lt;/P&gt;
&lt;P&gt;.04&lt;BR /&gt;,&lt;/P&gt;
&lt;P&gt;.03&lt;BR /&gt;&lt;BR /&gt;), 0, RowNo()))&lt;/P&gt;
&lt;P&gt;//"X" - Months in Service (log Scale)&lt;BR /&gt;, Pick(Match(ValueLoop(1,4,1),1,2,3,4),&lt;/P&gt;
&lt;P&gt;log(1)&lt;BR /&gt;,&lt;/P&gt;
&lt;P&gt;log(2)&lt;BR /&gt;,&lt;/P&gt;
&lt;P&gt;log(3)&lt;BR /&gt;,&lt;/P&gt;
&lt;P&gt;log(4)&lt;BR /&gt;&lt;BR /&gt;)))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 17:28:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-LinEst-M-and-RangeSum-to-get-slope-of-cumulative-data/m-p/1983835#M81167</guid>
      <dc:creator>nerf13</dc:creator>
      <dc:date>2022-09-21T17:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using LinEst_M and RangeSum to get slope of cumulative data</title>
      <link>https://community.qlik.com/t5/App-Development/Using-LinEst-M-and-RangeSum-to-get-slope-of-cumulative-data/m-p/1983840#M81168</link>
      <description>&lt;P&gt;I forgot to mention that it is not practical for me to do the RangeSum in advance (like loading in a script) right now, I'm hoping to resolve it within the expression!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 17:33:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-LinEst-M-and-RangeSum-to-get-slope-of-cumulative-data/m-p/1983840#M81168</guid>
      <dc:creator>nerf13</dc:creator>
      <dc:date>2022-09-21T17:33:07Z</dc:date>
    </item>
  </channel>
</rss>

