<?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: Use of variables in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-of-variables-in-Set-Analysis/m-p/518763#M193730</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Kiran, your answer works as well&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;Martina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jan 2014 14:19:27 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-01-16T14:19:27Z</dc:date>
    <item>
      <title>Use of variables in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-variables-in-Set-Analysis/m-p/518759#M193726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a table like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PN, SN, Date&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;PN1, SN1, 10/08/2013&lt;/P&gt;&lt;P&gt;PN2, SN2, 10/11/2013&lt;/P&gt;&lt;P&gt;PN3, SN1, 05/10/2012&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to present a graph (pivot table) like this:&lt;/P&gt;&lt;P&gt;SN, count(PN), count(PN) where Date &amp;gt;= &lt;STRONG&gt;vPrevious180days&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;SN1, 2, 1&lt;/P&gt;&lt;P&gt;SN2, 1, 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;vPrevious180days&lt;/STRONG&gt; is a variable calculated as follow&lt;/P&gt;&lt;P&gt;= Date(Num#(Num#(Num(Today (0))-180)),'DD/MM/YYYY')&lt;/P&gt;&lt;P&gt;e.g. Today is 16/01/2014, then &lt;STRONG&gt;vPrevious6Months&lt;/STRONG&gt; gets the value 20/07/2013&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I built a graph, where SN is a dimension. &lt;/P&gt;&lt;P&gt;Expressions are:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: Arial;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: Arial;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: Arial;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: Arial;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: Arial;"&gt;PN&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: Arial;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;count(DISTINCT{$&amp;lt;[Date]&amp;nbsp; =&amp;nbsp; {"&amp;gt;# &lt;STRONG&gt;vPrevious180days&lt;/STRONG&gt;"}&amp;gt;} (PN))&lt;/P&gt;&lt;P&gt;but it does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While specifying the date value (not using the variable) it works&lt;/P&gt;&lt;P&gt;count(DISTINCT{$&amp;lt;[ Date]&amp;nbsp; =&amp;nbsp; {"&amp;gt;01/08/2013"}&amp;gt;} (PN))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 13:32:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-variables-in-Set-Analysis/m-p/518759#M193726</guid>
      <dc:creator />
      <dc:date>2014-01-16T13:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Use of variables in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-variables-in-Set-Analysis/m-p/518760#M193727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See a doc I published on Set Analysis, there is the answer you ar elooking for:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-4951"&gt;http://community.qlik.com/docs/DOC-4951&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in fact, there is $(variableName)&lt;/P&gt;&lt;P&gt;like &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;{&amp;lt;TIME_KEY = &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: red; font-size: 10pt;"&gt;{"&amp;lt;$(vFirstPeriod)"}&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;Fabrice&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 13:38:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-variables-in-Set-Analysis/m-p/518760#M193727</guid>
      <dc:creator />
      <dc:date>2014-01-16T13:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Use of variables in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-variables-in-Set-Analysis/m-p/518761#M193728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Martina&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make Variable as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vTest&amp;nbsp; = Date(Today()-180,'DD/MM/YYYY')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and Use set Expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count(Distinct{&amp;lt;Date={"&amp;gt;=$(vTest)"}&amp;gt;} PN)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kiran Rode&lt;/P&gt;&lt;P&gt;+91 8976977897&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 13:56:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-variables-in-Set-Analysis/m-p/518761#M193728</guid>
      <dc:creator>kiranmanoharrode</dc:creator>
      <dc:date>2014-01-16T13:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Use of variables in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-variables-in-Set-Analysis/m-p/518762#M193729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe just a typo :&lt;/P&gt;&lt;P&gt;Use $ instead of # :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count(DISTINCT{$&amp;lt;[Date]&amp;nbsp; =&amp;nbsp; {"&amp;gt;$(&lt;STRONG&gt;vPrevious180days)&lt;/STRONG&gt;"}&amp;gt;} (PN))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 14:00:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-variables-in-Set-Analysis/m-p/518762#M193729</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2014-01-16T14:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Use of variables in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-variables-in-Set-Analysis/m-p/518763#M193730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Kiran, your answer works as well&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;Martina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 14:19:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-variables-in-Set-Analysis/m-p/518763#M193730</guid>
      <dc:creator />
      <dc:date>2014-01-16T14:19:27Z</dc:date>
    </item>
  </channel>
</rss>

