<?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: Set Analysis for Rolling Past Two Years in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-for-Rolling-Past-Two-Years/m-p/544404#M481787</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for the information. However, when I changed the expression to the following:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;(F_Year&amp;lt;=2011,&lt;BR /&gt;sum({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Year IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;= {2010,2011},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Month IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Month Name IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Source of Infection Description]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Severity Description]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Type of Infections]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;= &amp;gt;}total aggr(sum({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Year IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={2010,2011} ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Month IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Month Name IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Source of Infection Description]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Severity Description]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Type of Infections]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&amp;gt;}PD),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Year IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),&lt;BR /&gt;sum(aggr(rangesum(above(total sum({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Year IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;= ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Month IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Month Name IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Source of Infection Description]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Severity Description]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Type of Infections]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&amp;gt;}PD),num(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Month IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),24)),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Month Name IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;It still does not show up the correct answer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;My tab set up the way that once it is activated, there is a default selection on the type of infections. And not facilities have infection for each month, which screwed up this set analysis. And for some reason, although I told it to ignore the selection on the 'Source of infection' and 'Severity', when I picked specific source of infection, the numbers are not correct.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Could you please provide me with the correct expression if possible?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thank you so much!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Sep 2013 15:57:40 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-09-20T15:57:40Z</dc:date>
    <item>
      <title>Set Analysis for Rolling Past Two Years</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-for-Rolling-Past-Two-Years/m-p/544402#M481785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello QlikView folks,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the following expression to calculate a rolling tow year sum of patient days. As I have several list box, I used set analysis to tell the apps to ignore the selection.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;if (&lt;SPAN style="color: #ff0000;"&gt;F_Year&amp;lt;=2011&lt;/SPAN&gt;,&lt;BR /&gt;sum({$&amp;lt;[Event Year IMDt]= {2010,2011},[Event Month IMDt]=, [Event Month Name IMDt]=,[Source of Infection Description]=,[Severity Description]=, [Type of Infections]= &amp;gt;}total aggr(sum({$&amp;lt;[Event Year IMDt]={2010,2011} ,[Event Month IMDt]=, [Event Month Name IMDt]=, [Source of Infection Description]=,[Severity Description]=, [Type of Infections]=&amp;gt;}PD),[Event Year IMDt])),&lt;BR /&gt;sum({$&amp;lt;[Event Year IMDt]= {&lt;SPAN style="color: #ff0000;"&gt;'&amp;gt;=$(F_Year-2)&amp;lt;=$(F_Year-1)'&lt;/SPAN&gt;},[Event Month IMDt]=, [Event Month Name IMDt]=,[Source of Infection Description]=,[Severity Description]=, [Type of Infections]= &amp;gt;}total aggr(sum({$&amp;lt;[Event Year IMDt]={&lt;SPAN style="color: #ff0000;"&gt;'&amp;gt;=$(F_Year-2)&amp;lt;=$(F_Year-1)'&lt;/SPAN&gt;} ,[Event Month IMDt]=, [Event Month Name IMDt]=, [Source of Infection Description]=,[Severity Description]=, [Type of Infections]=&amp;gt;}PD),[Event Year IMDt]&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;As the date range is from 2010 to current, for years from 2010 to 2011 (by checking a variable called F_Year), I used the sum of patient days from 2010 to 2011. Starting from 2011, the sum patient days should be rolling for the previous 2 years. So for example, 2012, the number should be the sum of patient days from 2010 to 2011, and for 2013, the number should be the sum of patient days from 2011 to 2012. I used the expression (highlighted in &lt;SPAN style="color: #ff0000;"&gt;RED&lt;/SPAN&gt;); however, it did not work, except for Year 2010 and 2011. The value comes up as the total of ALL the patient days vs. previous 2 year for the rolling part.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Does any one have any thought on this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Thank you so much for your time!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 14:05:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-for-Rolling-Past-Two-Years/m-p/544402#M481785</guid>
      <dc:creator />
      <dc:date>2013-09-19T14:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis for Rolling Past Two Years</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-for-Rolling-Past-Two-Years/m-p/544403#M481786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You won't be able to use set analysis for this. The set is calculated once for the entire chart/table, not per row. See this document for more information and a solution: &lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-4252" style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3778c7; text-decoration: underline;"&gt;Calculating rolling n-period totals, averages or other aggregations&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 17:31:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-for-Rolling-Past-Two-Years/m-p/544403#M481786</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-09-19T17:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis for Rolling Past Two Years</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-for-Rolling-Past-Two-Years/m-p/544404#M481787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for the information. However, when I changed the expression to the following:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;(F_Year&amp;lt;=2011,&lt;BR /&gt;sum({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Year IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;= {2010,2011},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Month IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Month Name IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Source of Infection Description]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Severity Description]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Type of Infections]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;= &amp;gt;}total aggr(sum({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Year IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={2010,2011} ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Month IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Month Name IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Source of Infection Description]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Severity Description]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Type of Infections]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&amp;gt;}PD),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Year IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),&lt;BR /&gt;sum(aggr(rangesum(above(total sum({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Year IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;= ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Month IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Month Name IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Source of Infection Description]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Severity Description]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Type of Infections]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&amp;gt;}PD),num(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Month IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),24)),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Event Month Name IMDt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;It still does not show up the correct answer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;My tab set up the way that once it is activated, there is a default selection on the type of infections. And not facilities have infection for each month, which screwed up this set analysis. And for some reason, although I told it to ignore the selection on the 'Source of infection' and 'Severity', when I picked specific source of infection, the numbers are not correct.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Could you please provide me with the correct expression if possible?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thank you so much!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2013 15:57:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-for-Rolling-Past-Two-Years/m-p/544404#M481787</guid>
      <dc:creator />
      <dc:date>2013-09-20T15:57:40Z</dc:date>
    </item>
  </channel>
</rss>

