<?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: problem with set analysis with string variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/problem-with-set-analysis-with-string-variable/m-p/1112936#M918880</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Hi Sunny,&lt;/EM&gt;&lt;/STRONG&gt;&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;So, in the set analysis the dimension MonthYear, created during the script load, needs the dimension Year when using the variable:&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;MonthYear={'$(=$(vmyMonthpreviousYear))'},Year&amp;gt;}cash)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Antonio&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: I checked and just using Year does the job, do not need Month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In my live envirenment I had to remove the dimension MonthYear from the straight table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 May 2016 09:40:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-05-11T09:40:38Z</dc:date>
    <item>
      <title>problem with set analysis with string variable</title>
      <link>https://community.qlik.com/t5/QlikView/problem-with-set-analysis-with-string-variable/m-p/1112934#M918878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;Good afternoon,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the enclosed sample I tried without success to show the collected cash of a game for the same month but a year back of the year that I have currently selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my script is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;LOAD&lt;/SPAN&gt; datecollect, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; game,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;Money&lt;/SPAN&gt;([cash],'€ #.##0') &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; cash,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;MonthName&lt;/SPAN&gt;(datecollect) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; MonthYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;Month&lt;/SPAN&gt;(datecollect) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; Month,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;Year&lt;/SPAN&gt;(datecollect) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; Year&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;FROM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(&lt;SPAN style="color: #0000ff;"&gt;ooxml&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;embedded labels&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #339966;"&gt;//set vmyMonthpreviousYear = "(Month &amp;amp; ' ' &amp;amp; (Year-1))";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;set&lt;/SPAN&gt; vmyMonthpreviousYear = MonthName(AddMonths(datecollect, -12))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can correctly show in a text box the value of the variable $(vmyMonthpreviousYear) which is the same month as the selected one and but one year back of the year that I have currently selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't find the correct set analysis in order to show the cash using the variable, while I can show the cash of a year using&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;Year={'2016'},Month=&amp;gt;}cash)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe I am trying to use the wrong variable or I have taken it from the wrong way ? or it is a matter of syntax?&lt;/P&gt;&lt;P&gt;I thought that&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;MonthYear={'$(vmyMonthpreviousYear)'}&amp;gt;}cash)&lt;/P&gt;&lt;P&gt;would work but it does not...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help is appreciated&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Antonio&lt;/P&gt;&lt;P&gt;&lt;IMG alt="set analysis with string variable.png" class="jive-image image-1" height="405" src="/legacyfs/online/124099_set analysis with string variable.png" style="height: 405px; width: 791.95px;" width="792" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-with-set-analysis-with-string-variable/m-p/1112934#M918878</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: problem with set analysis with string variable</title>
      <link>https://community.qlik.com/t5/QlikView/problem-with-set-analysis-with-string-variable/m-p/1112935#M918879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({$&amp;lt;MonthYear={'&lt;SPAN style="color: #ff0000;"&gt;$(=&lt;/SPAN&gt;$(vmyMonthpreviousYear)&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt;'}&lt;SPAN style="color: #ff0000;"&gt;, Year, Month&lt;/SPAN&gt;&amp;gt;}cash)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG __jive_id="124137" alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/124137_Capture.PNG" style="height: 178px; width: 620px;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2016 17:31:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-with-set-analysis-with-string-variable/m-p/1112935#M918879</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-10T17:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: problem with set analysis with string variable</title>
      <link>https://community.qlik.com/t5/QlikView/problem-with-set-analysis-with-string-variable/m-p/1112936#M918880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Hi Sunny,&lt;/EM&gt;&lt;/STRONG&gt;&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;So, in the set analysis the dimension MonthYear, created during the script load, needs the dimension Year when using the variable:&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;MonthYear={'$(=$(vmyMonthpreviousYear))'},Year&amp;gt;}cash)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Antonio&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: I checked and just using Year does the job, do not need Month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In my live envirenment I had to remove the dimension MonthYear from the straight table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 09:40:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-with-set-analysis-with-string-variable/m-p/1112936#M918880</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-11T09:40:38Z</dc:date>
    </item>
  </channel>
</rss>

