<?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 parameter in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-parameter/m-p/405402#M150876</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The load script could look something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Join (Sales)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD ArticleNr, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ArticleReleaseDate&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident Articles;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Join (Sales)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Date,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ArticleNr,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Date &amp;lt; ArticleReleaseDate, 1, 0) As ReleaseFlag&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident Sales;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Field ArticleReleaseDate From Sales;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adjust the script accordingly for your object names. I am assuming that you have a &lt;EM&gt;ArticleNr&lt;/EM&gt; exists in both tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Sep 2012 14:35:52 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2012-09-13T14:35:52Z</dc:date>
    <item>
      <title>Set analysis with parameter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-parameter/m-p/405395#M150869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have this expression in a pivot chart:&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Date= {"&amp;lt;$(=Date(ArticleReleaseDate))"}&amp;gt; } Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to show how much the article have sold before it was released. However, when i select one article the expression works. But when i dont have anything selected it does not, instead it shows the total sales for each product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any tips?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 14:06:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-parameter/m-p/405395#M150869</guid>
      <dc:creator />
      <dc:date>2012-09-13T14:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with parameter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-parameter/m-p/405396#M150870</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum({&amp;lt;Date= {"&amp;lt;$(=Date(ArticleReleaseDate))"}&amp;gt; } Sales) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 14:09:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-parameter/m-p/405396#M150870</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-09-13T14:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with parameter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-parameter/m-p/405397#M150871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you got an example to try on ?&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 14:12:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-parameter/m-p/405397#M150871</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-13T14:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with parameter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-parameter/m-p/405398#M150872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Same problem im afraid. Thanks anyway&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 14:20:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-parameter/m-p/405398#M150872</guid>
      <dc:creator />
      <dc:date>2012-09-13T14:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with parameter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-parameter/m-p/405399#M150873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No I havnt, the application is to big.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 14:21:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-parameter/m-p/405399#M150873</guid>
      <dc:creator />
      <dc:date>2012-09-13T14:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with parameter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-parameter/m-p/405400#M150874</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;Add the max() function to expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Date= {"&amp;lt;$(=Date(Max(ArticleReleaseDate)))"}&amp;gt; } Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ricardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 14:32:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-parameter/m-p/405400#M150874</guid>
      <dc:creator />
      <dc:date>2012-09-13T14:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with parameter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-parameter/m-p/405401#M150875</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;The reason this only works when something is selected is that without a selection, which article should the expression use? Remember set analysis executes outside the context of a chart/table and has no knowledge of the dimensions. If you are using this inside a table and want the date subject to the article (and the article is a dimensionm or unique within a dimension), then the only approach is to use sum(If())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Sum(If(Date=&amp;lt;Date(ArticleReleaseDate) Sales))&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SumIf does perform poorly compared to set analysis, and if that approach takes too long to compute, you might want to add a flag in the load script to indicate sales with dates less than the release date. Then you can use something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Sum({&amp;lt;ReleaseFlag={1}&amp;gt;} Sales)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 14:32:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-parameter/m-p/405401#M150875</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-09-13T14:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with parameter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-parameter/m-p/405402#M150876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The load script could look something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Join (Sales)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD ArticleNr, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ArticleReleaseDate&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident Articles;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Join (Sales)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Date,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ArticleNr,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Date &amp;lt; ArticleReleaseDate, 1, 0) As ReleaseFlag&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident Sales;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Field ArticleReleaseDate From Sales;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adjust the script accordingly for your object names. I am assuming that you have a &lt;EM&gt;ArticleNr&lt;/EM&gt; exists in both tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 14:35:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-parameter/m-p/405402#M150876</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-09-13T14:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with parameter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-parameter/m-p/405403#M150877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jonathan. I will try this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 14:39:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-parameter/m-p/405403#M150877</guid>
      <dc:creator />
      <dc:date>2012-09-13T14:39:19Z</dc:date>
    </item>
  </channel>
</rss>

