<?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: Pivot Tables &amp; Set Analysis: Survival Triangles in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pivot-Tables-Set-Analysis-Survival-Triangles/m-p/455267#M564597</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Specifically, I think I want the result when terms survived = 3 to be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum of ( all quarters at terms = 0 where (terms = 3 =/= 0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if that makes more sense.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jan 2013 18:21:22 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-01-24T18:21:22Z</dc:date>
    <item>
      <title>Pivot Tables &amp; Set Analysis: Survival Triangles</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Tables-Set-Analysis-Survival-Triangles/m-p/455266#M564596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, I have a data set that looks (roughly) like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;99 90 80 70 60 &lt;/P&gt;&lt;P&gt;99 92 83 74 00&lt;/P&gt;&lt;P&gt;95 87 72 00 00&lt;/P&gt;&lt;P&gt;86 81 00 00 00&lt;/P&gt;&lt;P&gt;97 00 00 00 00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where each new row is a quarter (eg. 2008Q1, 2008Q2), each new column is the # of terms it has survived (0,1,2...) and each data element is the total # of policies remaining that were new beginning in that quarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to do is add a field for a policy weighted column average - i.e. (# of policies remaining that have survived X terms) / (# of policies that began in terms at least X terms ago).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the top() and first() expressions, I have so far created a pivot table where every field value is the correct answer - for the sample table above, it'd be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;100% 89.9% 80.2% 72.7% 60.6%&lt;/P&gt;&lt;P&gt;100% 89.9% 80.2% 72.7% 60.6%&lt;/P&gt;&lt;P&gt;100% 89.9% 80.2% 72.7% 60.6%&lt;/P&gt;&lt;P&gt;100% 89.9% 80.2% 72.7% 60.6%&lt;/P&gt;&lt;P&gt;100% 89.9% 80.2% 72.7% 60.6%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, putting an object like the above on a dashboard for publication is ugly, and I want to avoid it. I would prefer a one-line summary, and I think I need a set analysis expression to do it, but I'm having trouble formulating it. How do you formulate (# of policies remaining) / (# of policies that could potentially have gotten this far) without a 2-dimensional table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 18:12:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Tables-Set-Analysis-Survival-Triangles/m-p/455266#M564596</guid>
      <dc:creator />
      <dc:date>2013-01-24T18:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Tables &amp; Set Analysis: Survival Triangles</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Tables-Set-Analysis-Survival-Triangles/m-p/455267#M564597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Specifically, I think I want the result when terms survived = 3 to be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum of ( all quarters at terms = 0 where (terms = 3 =/= 0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if that makes more sense.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 18:21:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Tables-Set-Analysis-Survival-Triangles/m-p/455267#M564597</guid>
      <dc:creator />
      <dc:date>2013-01-24T18:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Tables &amp; Set Analysis: Survival Triangles</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Tables-Set-Analysis-Survival-Triangles/m-p/455268#M564598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wound up doing it the ugly way. Got the denominator with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(terms_survived = 0, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=20"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived = 1, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=19"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived = 2, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=18"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived = 3, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=17"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived = 4, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=16"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived = 5, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=15"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived = 6, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=14"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived = 7, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=13"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived = 8, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=12"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived = 9, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=11"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived = 10, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=10"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived = 11, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=9"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived = 12, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=8"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived = 13, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=7"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived = 14, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=6"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived = 15, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=5"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived = 16, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=4"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived = 17, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=3"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived = 18, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=2"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived = 19, rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=1"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;if(terms_survived =20 , rangesum(last(sum({$&amp;lt;cohort2 = {"&amp;lt;=0"}&amp;gt;} ind),1,21)),&lt;/P&gt;&lt;P&gt;)))))))))))))))))))))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 23:10:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Tables-Set-Analysis-Survival-Triangles/m-p/455268#M564598</guid>
      <dc:creator />
      <dc:date>2013-02-27T23:10:16Z</dc:date>
    </item>
  </channel>
</rss>

