<?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_R2 with two measures in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/using-linest-R2-with-two-measures/m-p/1320008#M409161</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two measures that I want to calculate a slope line and an R-squared for.&amp;nbsp; The formulas for the two measures are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;X: Sum(VisitCounter)/Sum( {&amp;lt;Category = {'Provider'}&amp;gt;} Hours)&lt;/P&gt;&lt;P&gt;Y: Sum( {&amp;lt;Category = {'Business Support'},Category = {'Clinical Support'}&amp;gt;} Hours)/Sum( {&amp;lt;Category = {'Provider'}&amp;gt;} Hours)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot figure out how to get this done.&amp;nbsp; Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Jul 2017 13:54:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-07-31T13:54:45Z</dc:date>
    <item>
      <title>using linest_R2 with two measures</title>
      <link>https://community.qlik.com/t5/QlikView/using-linest-R2-with-two-measures/m-p/1320008#M409161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two measures that I want to calculate a slope line and an R-squared for.&amp;nbsp; The formulas for the two measures are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;X: Sum(VisitCounter)/Sum( {&amp;lt;Category = {'Provider'}&amp;gt;} Hours)&lt;/P&gt;&lt;P&gt;Y: Sum( {&amp;lt;Category = {'Business Support'},Category = {'Clinical Support'}&amp;gt;} Hours)/Sum( {&amp;lt;Category = {'Provider'}&amp;gt;} Hours)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot figure out how to get this done.&amp;nbsp; Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jul 2017 13:54:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-linest-R2-with-two-measures/m-p/1320008#M409161</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-31T13:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: using linest_R2 with two measures</title>
      <link>https://community.qlik.com/t5/QlikView/using-linest-R2-with-two-measures/m-p/1320009#M409162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you give an example of how you would want the end result to look like?&lt;/P&gt;&lt;P&gt;Possibly with some sample data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 08:41:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-linest-R2-with-two-measures/m-p/1320009#M409162</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-02T08:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: using linest_R2 with two measures</title>
      <link>https://community.qlik.com/t5/QlikView/using-linest-R2-with-two-measures/m-p/1320010#M409163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create a variable X and Y, and use linest_R2( $(Y) , $(X) ) in the KPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mohan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Aug 2017 12:45:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-linest-R2-with-two-measures/m-p/1320010#M409163</guid>
      <dc:creator>mohan_1105</dc:creator>
      <dc:date>2017-08-08T12:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: using linest_R2 with two measures</title>
      <link>https://community.qlik.com/t5/QlikView/using-linest-R2-with-two-measures/m-p/1320011#M409164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried it but it didn't work.&amp;nbsp; My X and Y variables (see formulas above) are both measures.&lt;/P&gt;&lt;P&gt;X=Provider Worked Hours per Visit&lt;/P&gt;&lt;P&gt;Y= Ratio of Clinical and Business Associate Worked Hours to Provider Worked Hours&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The dimension would be the combination of the location code and the date, or just the date&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I spent about 2 hours playing with this but I haven't figured it out yet.&amp;nbsp; It seems like LINEST_SR needs one dimension and only one measure.&amp;nbsp; Any advice you could provide would help. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 19:55:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-linest-R2-with-two-measures/m-p/1320011#M409164</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-15T19:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: using linest_R2 with two measures</title>
      <link>https://community.qlik.com/t5/QlikView/using-linest-R2-with-two-measures/m-p/1320012#M409165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Were you able to find solution ?&lt;BR /&gt;I too tried similar approach, but it is not working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2017 12:30:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-linest-R2-with-two-measures/m-p/1320012#M409165</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-14T12:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: using linest_R2 with two measures</title>
      <link>https://community.qlik.com/t5/QlikView/using-linest-R2-with-two-measures/m-p/1320013#M409166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did get a solution, it had to do with how I loaded my data into Qlik.&amp;nbsp; Here is the pertinent code;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test1:&lt;BR /&gt;Load&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; W_PUCC &amp;amp; '_' &amp;amp; Text(Date([Date],'YYYY-MM-DD')) AS LocDay, &lt;BR /&gt;&amp;nbsp;&amp;nbsp; Sum(SupportHours)/ Sum(ProviderHours) as SupportToProviderRatio, &lt;BR /&gt;&amp;nbsp;&amp;nbsp; Sum(ProviderHours) as TotalProviderHoursPerDay &lt;BR /&gt;Resident API_WorkedHoursData&lt;BR /&gt;Group by Date, W_PUCC ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test2:&lt;BR /&gt;Load&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LocDay, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(VisitCounter) as VisitCountPerDay &lt;BR /&gt;Resident KioskData&lt;BR /&gt;group by LocDay;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Left Join (Test1) &lt;BR /&gt;Load *&lt;BR /&gt;Resident Test2;&lt;/P&gt;&lt;P&gt;Drop table Test2; &lt;/P&gt;&lt;P&gt;Test:&lt;BR /&gt;Load *,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VisitCountPerDay/TotalProviderHoursPerDay as VisitsPerProviderHour &lt;BR /&gt;Resident Test1;&lt;/P&gt;&lt;P&gt;Drop table Test1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I put linest into a KPI:&lt;/P&gt;&lt;P&gt;=&amp;nbsp; linest_R2 (VisitsPerProviderHour, SupportToProviderRatio)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Credit to Marian Rubin for coming up with the code for Test, above)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VisitsPerProviderHour is the dependent variable, SupportToProviderRatio is the independent variable&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Dec 2017 13:27:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-linest-R2-with-two-measures/m-p/1320013#M409166</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-29T13:27:38Z</dc:date>
    </item>
  </channel>
</rss>

