<?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: Set Analysis with variables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/408454#M1150620</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;can i have some simple example on this please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Oct 2017 08:55:25 GMT</pubDate>
    <dc:creator>vinod22kv</dc:creator>
    <dc:date>2017-10-05T08:55:25Z</dc:date>
    <item>
      <title>Set Analysis with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/408448#M1150614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I'm want to show s&lt;/SPAN&gt;&lt;SPAN class="hps"&gt;ales&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;in the same period (of selection)&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;of&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;12&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;months back&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I hold 2 variables:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;vDateMin = &lt;SPAN style="color: #0000ff;"&gt;MonthStart&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;AddMonths&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;min&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;), -12)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;vDateMax = &lt;SPAN style="color: #0000ff;"&gt;MonthEnd&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;AddMonths&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Max&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;), -12)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;And now I want to use the variable in pivot table expression like: &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;Sum({$&amp;lt;&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt; = {&lt;SPAN style="color: #800000;"&gt;"&amp;gt; $(#vDateMin) &amp;lt; $(#vDateMax)"&lt;/SPAN&gt;}&amp;gt;}&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vSales)&lt;/EM&gt;&lt;/STRONG&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;and It doesn't work for me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if I do it manually like this: &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;Sum({$&amp;lt;&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt; = {&lt;SPAN style="color: #800000;"&gt;"&amp;gt;=01/01/2011 &amp;lt;= 28/02/2012"&lt;/SPAN&gt;}&amp;gt;}&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vSales)&lt;/EM&gt;&lt;/STRONG&gt;)&amp;nbsp; Its work fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;What am I&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;doing wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Tnks - &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Matan.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 07:26:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/408448#M1150614</guid>
      <dc:creator>matancha</dc:creator>
      <dc:date>2013-04-29T07:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/408449#M1150615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" href="https://community.qlik.com/people/plzmatanch" id="jive-4759220602620901617076"&gt;plzmatanch&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Sum({$&amp;lt;&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt; = {&lt;/SPAN&gt;"$(='&amp;gt;'&amp;amp;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;(vDateMin)&lt;/SPAN&gt;&amp;amp;'&amp;lt;'&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #800000;"&gt;(vDateMax)"&lt;/SPAN&gt;}&amp;gt;}&lt;STRONG&gt;&lt;EM style="color: #808080;"&gt;$(vSales)&lt;/EM&gt;&lt;/STRONG&gt;) &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please trie this way. &lt;/P&gt;&lt;P&gt;hope that helps you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 08:10:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/408449#M1150615</guid>
      <dc:creator>fdelacal</dc:creator>
      <dc:date>2013-04-29T08:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/408450#M1150616</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;Try this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;vDateMin = &lt;SPAN style="color: #0000ff;"&gt;MonthStart&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;AddMonths&lt;/SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;), -12)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;vDateMax = &lt;SPAN style="color: #0000ff;"&gt;MonthEnd&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;AddMonths&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Max&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;), -12)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;=Sum({&amp;lt;YearDimensionName=, MonthDimensionName=, QuarterDimensionName=, &lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt; = {&lt;SPAN style="color: #800000;"&gt;"&amp;gt;=$(=vDateMin)&amp;lt;=$(=vDateMax)"&lt;/SPAN&gt;}&amp;gt;}&lt;STRONG&gt;&lt;EM style="color: #808080;"&gt;$(vSales)&lt;/EM&gt;&lt;/STRONG&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Exclude the date filters like Year, Month or Quarter selections if there are any.&amp;nbsp; Also check whether the date formats are same in Variable and Dimension.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Hope this helps you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 08:43:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/408450#M1150616</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2013-04-29T08:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/408451#M1150617</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;Please check your date format of the variable&amp;nbsp; Date&amp;nbsp; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 09:28:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/408451#M1150617</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2013-04-29T09:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/408452#M1150618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your script working fine.&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;Date = {'&amp;gt; $(=vDateMin) &amp;lt;$(=vDateMax)'}&amp;gt;}$(vSales)) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 10:07:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/408452#M1150618</guid>
      <dc:creator />
      <dc:date>2013-04-29T10:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/408453#M1150619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tnks jagan.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;I Think that my problem was that I didn't do the "Year=...."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;many thanks to all of you for your answers - &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Matan.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 10:30:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/408453#M1150619</guid>
      <dc:creator>matancha</dc:creator>
      <dc:date>2013-04-29T10:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/408454#M1150620</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;can i have some simple example on this please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2017 08:55:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/408454#M1150620</guid>
      <dc:creator>vinod22kv</dc:creator>
      <dc:date>2017-10-05T08:55:25Z</dc:date>
    </item>
  </channel>
</rss>

