<?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 Set Analysis Problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem/m-p/380576#M1166629</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having a spot of bother around a set analysis.&lt;/P&gt;&lt;P&gt;I have a line chart and want to display values as at the same time in the previous year.&amp;nbsp; However, my issue surrounds the selected variable.&amp;nbsp; For example, the selected variable (Trimester) displays as follows:&amp;nbsp; 2012-2 (denoting 2012 as the year and 2 as the semester). I really don't want to split up the variable into 2 user selections/fields (Year and Semester) and run set analysis against these as it will add a layer of possible user error.&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13457860062875574" jivemacro_uid="_13457860062875574"&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code I am using is:&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;=&lt;SPAN style="color: #0000ff;"&gt;COUNT&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;Trimester&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"$(LEFT(Trimester, 4)-1) &amp;amp; '-' &amp;amp; RIGHT(Trimester, 1)"&lt;/SPAN&gt;}&amp;gt;}&lt;SPAN style="color: #0000ff;"&gt;DISTINCT&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;PERSON_ID))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; have also tried&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;=&lt;SPAN style="color: #0000ff;"&gt;COUNT&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;Trimester&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"$(LEFT(Trimester, 4)-1) + '-' + RIGHT(Trimester, 1)"&lt;/SPAN&gt;}&amp;gt;}&lt;SPAN style="color: #0000ff;"&gt;DISTINCT&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;PERSON_ID))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and just plain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;=&lt;SPAN style="color: #0000ff;"&gt;COUNT&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;Trimester&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"$(LEFT(Trimester, 4)-1)"&lt;/SPAN&gt;}&amp;gt;}&lt;SPAN style="color: #0000ff;"&gt;DISTINCT&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;PERSON_ID))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have tried variants of the above and have come up feeling rather empty and dejected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions would be welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample file attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Aug 2012 05:35:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-08-24T05:35:12Z</dc:date>
    <item>
      <title>Set Analysis Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem/m-p/380576#M1166629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having a spot of bother around a set analysis.&lt;/P&gt;&lt;P&gt;I have a line chart and want to display values as at the same time in the previous year.&amp;nbsp; However, my issue surrounds the selected variable.&amp;nbsp; For example, the selected variable (Trimester) displays as follows:&amp;nbsp; 2012-2 (denoting 2012 as the year and 2 as the semester). I really don't want to split up the variable into 2 user selections/fields (Year and Semester) and run set analysis against these as it will add a layer of possible user error.&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13457860062875574" jivemacro_uid="_13457860062875574"&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code I am using is:&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;=&lt;SPAN style="color: #0000ff;"&gt;COUNT&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;Trimester&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"$(LEFT(Trimester, 4)-1) &amp;amp; '-' &amp;amp; RIGHT(Trimester, 1)"&lt;/SPAN&gt;}&amp;gt;}&lt;SPAN style="color: #0000ff;"&gt;DISTINCT&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;PERSON_ID))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; have also tried&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;=&lt;SPAN style="color: #0000ff;"&gt;COUNT&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;Trimester&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"$(LEFT(Trimester, 4)-1) + '-' + RIGHT(Trimester, 1)"&lt;/SPAN&gt;}&amp;gt;}&lt;SPAN style="color: #0000ff;"&gt;DISTINCT&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;PERSON_ID))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and just plain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;=&lt;SPAN style="color: #0000ff;"&gt;COUNT&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;Trimester&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"$(LEFT(Trimester, 4)-1)"&lt;/SPAN&gt;}&amp;gt;}&lt;SPAN style="color: #0000ff;"&gt;DISTINCT&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;PERSON_ID))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have tried variants of the above and have come up feeling rather empty and dejected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions would be welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample file attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 05:35:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem/m-p/380576#M1166629</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-24T05:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem/m-p/380577#M1166630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Karl,&lt;/P&gt;&lt;P&gt;&amp;nbsp; I have tried your Set with many different approaches. Strange that it still shows Last Year 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I turn your chart to straight table to see the values.&lt;/P&gt;&lt;P&gt;I also observe that you have kept Last Year expression at Full Accumulation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The below expression displays data for Last year though its not the correct way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;COUNT({&amp;lt;Trimester={'2011-2'}&amp;gt;}DISTINCT(PERSON_ID))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know once you find more about this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Advait&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 06:22:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem/m-p/380577#M1166630</guid>
      <dc:creator>advait_thakur</dc:creator>
      <dc:date>2012-08-24T06:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem/m-p/380578#M1166631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use a variable and dollar sign expansion in the set analysis with single quotes. Check attached .qvw.&lt;/P&gt;&lt;P&gt;Regards, Sander&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 09:55:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem/m-p/380578#M1166631</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-24T09:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem/m-p/380579#M1166632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, and if you switch on full accumulation again for both expressions its cumulative again (open door). I switched this of to check if single values matched when changing the trimester. Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 10:16:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem/m-p/380579#M1166632</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-24T10:16:27Z</dc:date>
    </item>
  </channel>
</rss>

