<?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: Complex variable in set expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Complex-variable-in-set-expression/m-p/64665#M10767</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to try vDateSel like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;03/10/2018', '10/03/2018', ...'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Apr 2018 13:07:29 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-04-19T13:07:29Z</dc:date>
    <item>
      <title>Complex variable in set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-variable-in-set-expression/m-p/64664#M10766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Hi,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Currently, I use following expresion in set analysis:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Sum({&amp;lt;Date_Select={'$(vDate_Sel1)', '$(vDate_Sel2)', '$(vDate_Sel3)', '$(vDate_Sel4)' &lt;SPAN style="font-size: 10pt;"&gt;}&amp;gt;} Sales_Amount&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;and each variable has a date assigned, like '03/10/2018', '10/03/2018', .....&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;When I try to use one variable 'vDate_Sel' with value like '&lt;SPAN style="font-size: 13.3333px;"&gt;03/10/2018, 10/03/2018, ...' then set analysis doesn't work. Probably, it is being treated as a string, not separated date values.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;How should I use 'vDate'Sel' variable with multiple date values to work correctly in set expression?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Piotr&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 13:05:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-variable-in-set-expression/m-p/64664#M10766</guid>
      <dc:creator>piotrtk</dc:creator>
      <dc:date>2018-04-19T13:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: Complex variable in set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-variable-in-set-expression/m-p/64665#M10767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to try vDateSel like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;03/10/2018', '10/03/2018', ...'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 13:07:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-variable-in-set-expression/m-p/64665#M10767</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-04-19T13:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Complex variable in set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-variable-in-set-expression/m-p/64666#M10768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the format of your date field &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Date_Select?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 13:07:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-variable-in-set-expression/m-p/64666#M10768</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2018-04-19T13:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: Complex variable in set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-variable-in-set-expression/m-p/64667#M10769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, it doesn't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 13:20:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-variable-in-set-expression/m-p/64667#M10769</guid>
      <dc:creator>piotrtk</dc:creator>
      <dc:date>2018-04-19T13:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Complex variable in set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-variable-in-set-expression/m-p/64668#M10770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a little more complex as I have described. Actually, each variable includes 2 dates separated by '|' in format YYYY-MM-DD, like&lt;/P&gt;&lt;P&gt;2018-03-10|2017-12-31&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But anyway, I can't create one variable with few such values. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 13:23:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-variable-in-set-expression/m-p/64668#M10770</guid>
      <dc:creator>piotrtk</dc:creator>
      <dc:date>2018-04-19T13:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Complex variable in set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-variable-in-set-expression/m-p/64669#M10771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 13:24:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-variable-in-set-expression/m-p/64669#M10771</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-04-19T13:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Complex variable in set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-variable-in-set-expression/m-p/64670#M10772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At the end I have found it works:&lt;/P&gt;&lt;P&gt;"You need to try vDateSel like this&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;03/10/2018', '10/03/2018', ...'"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in set expression I need to write:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date_Select={$(vDate_Sel)}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of: Date_Select={'$(vDate_Sel)'}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure why, but it works in this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 13:45:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-variable-in-set-expression/m-p/64670#M10772</guid>
      <dc:creator>piotrtk</dc:creator>
      <dc:date>2018-04-19T13:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Complex variable in set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-variable-in-set-expression/m-p/64671#M10773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Two other possibilities:&lt;/P&gt;&lt;P&gt;I don't know the underlying structure of the VARs "Dat_Sel&lt;N&gt;" but have you tried considered "CHR(39) &amp;amp; Concat(DISTINCT [Date Field], CHR(39) &amp;amp; ',' &amp;amp; CHR(39)) &amp;amp; CHR(39)" to create your full string of dates with single-quote separation.&lt;/N&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alterniatively, have you considered double-barrelling columns in said table one where date is a NUM (for set analysis) and one (as is present) where Date is in a user-friendly format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in set analysis you put: SUM({$&amp;lt;Date_NUM = {$(=[Expression to return all dates as NUM separated by comma]), Date_Select=}&amp;gt;} Value).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "Date Select=" in the set analysis will allow user to make selections on this field and the "Date_NUM [with expression]" will resolve for the right dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Worth a try maybe. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 13:47:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-variable-in-set-expression/m-p/64671#M10773</guid>
      <dc:creator>cheenu_janakira</dc:creator>
      <dc:date>2018-04-19T13:47:46Z</dc:date>
    </item>
  </channel>
</rss>

