<?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: Escaping apostrophe in if statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Escaping-apostrophe-in-if-statement/m-p/99508#M759635</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this may be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(vSelectionValue = 2017, Chr(39) &amp;amp; '2017/Q1' &amp;amp; Chr(39) &amp;amp; ',' &amp;amp; Chr(39) &amp;amp; '2017/Q2' &amp;amp; Chr(39) &amp;amp; ',' &amp;amp; Chr(39) &amp;amp; '2017/Q3' &amp;amp; Chr(39) &amp;amp; ',' &amp;amp; Chr(39) &amp;amp; '2017/Q4' &amp;amp; Chr(39),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(vSelectionValue = 2018, Chr(39) &amp;amp; '2018/Q1' &amp;amp; Chr(39) &amp;amp; ',' &amp;amp; Chr(39) &amp;amp; '2018/Q2' &amp;amp; Chr(39)))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Aug 2018 16:20:17 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-08-20T16:20:17Z</dc:date>
    <item>
      <title>Escaping apostrophe in if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Escaping-apostrophe-in-if-statement/m-p/99507#M759634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have declared a variable &lt;STRONG&gt;vYear_Quarter &lt;/STRONG&gt;as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; =if(vSelectionValue = 2017,'2017/Q1, 2017/Q2, 2017/Q3, 2017/Q4',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(vSelectionValue = 2018,'2018/Q1,2018/Q2'))&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;BR /&gt;&lt;/STRONG&gt;The above expression returns &lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;vYear_Quarter = &lt;/STRONG&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;2017/Q1, 2017/Q2, 2017/Q3, 2017/Q4 &lt;/STRONG&gt;if I select year 2017 and&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt; &lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;vYear_Quarter = &lt;/STRONG&gt;2018/Q1,2018/Q2 &lt;/STRONG&gt;if I select year 2018&lt;/P&gt;&lt;P&gt;.But I want to get the value &lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;vYear_Quarter &lt;/STRONG&gt;in a such a way that it could be fed to a set expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; =sum({&amp;lt;"YearQ"={'$(vYear_Quarter )'}}&amp;gt;}AMOUNT)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;But with the if statement i am not able to get the value of &lt;STRONG style="font-size: 13.3333px;"&gt;vYear_Quarter&amp;nbsp; &lt;/STRONG&gt;in the form such as &lt;STRONG style="font-size: 13.3333px;"&gt;'2018/Q1','2018/Q2'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I want 2018/Q1 and 2018/Q2 in apostrophe and seperated by comma&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/Escaping-apostrophe-in-if-statement/m-p/99507#M759634</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping apostrophe in if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Escaping-apostrophe-in-if-statement/m-p/99508#M759635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this may be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(vSelectionValue = 2017, Chr(39) &amp;amp; '2017/Q1' &amp;amp; Chr(39) &amp;amp; ',' &amp;amp; Chr(39) &amp;amp; '2017/Q2' &amp;amp; Chr(39) &amp;amp; ',' &amp;amp; Chr(39) &amp;amp; '2017/Q3' &amp;amp; Chr(39) &amp;amp; ',' &amp;amp; Chr(39) &amp;amp; '2017/Q4' &amp;amp; Chr(39),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(vSelectionValue = 2018, Chr(39) &amp;amp; '2018/Q1' &amp;amp; Chr(39) &amp;amp; ',' &amp;amp; Chr(39) &amp;amp; '2018/Q2' &amp;amp; Chr(39)))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2018 16:20:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Escaping-apostrophe-in-if-statement/m-p/99508#M759635</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-08-20T16:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping apostrophe in if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Escaping-apostrophe-in-if-statement/m-p/99509#M759636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Amazing &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2018 16:58:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Escaping-apostrophe-in-if-statement/m-p/99509#M759636</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-20T16:58:26Z</dc:date>
    </item>
  </channel>
</rss>

