<?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 Need help with Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-with-Set-Analysis/m-p/245918#M93718</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris, &lt;/P&gt;&lt;P&gt;thx for your reply. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I worked with IntervalMatch once, and usually try to avoid it whenever possible when working with large tables. From my earlier experiences i learned, that the reload times with intervalmatches gets really slow and often also cancels with errors, if the data table contains more than a million lines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And my facts table is really huge, consisting of several hundreds of millions of records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could try to solve the problem using IF expressions instead auf Set Analysis, but i heard, it should be less performant. And if you can imagine performance is really important within this application (with a file size of 3GB &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;)&lt;/P&gt;&lt;P&gt;If it doesn't work (well) i'll try your recommendation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Aug 2011 12:41:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-08-03T12:41:43Z</dc:date>
    <item>
      <title>Need help with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Set-Analysis/m-p/245916#M93716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope somenone can help me with my Set Analysis Expression. I'm no native English speaker, i hope you apologize.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a relatively complex application model, so that i can't directly link the following dimension table to my facts table. That is, why i try to solve the expression using set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My dimension table looks like &lt;/P&gt;&lt;P&gt;SalesCampaign, CampaignStartDate, CampaignEndDate, ProductID&lt;/P&gt;&lt;P&gt;A, 2011-07-01, 2011-07-10, 1001&lt;/P&gt;&lt;P&gt;A, 2011-07-01, 2011-07-10, 1002&lt;/P&gt;&lt;P&gt;B, 2011-07-30, 2011-08-08, 1005&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the facts table contains - besides a dozen other columns - productId, date of sale, sold pieces, revenue&lt;/P&gt;&lt;P&gt;1001, 2011-06-30, 1, 10.50&lt;/P&gt;&lt;P&gt;1001, 2011-07-05, 2, 18.00&lt;/P&gt;&lt;P&gt;1004, 2011-07-05, 1, 45.00&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i try to accomplish is to sum up sold pieces and revenue per campaign product.&lt;/P&gt;&lt;P&gt;My Chart dimensions are SalesCampaign and ProductID and i tried to use Set Analysis to only get the relevant sales per product within the campaign period, but i can't get the expression working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried out several "syntaxes" like&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;%SalesDate= {"&amp;gt;= date([CampaignStartDate]) &amp;lt;= date([CampaignEndDate])"}&amp;gt;}&amp;nbsp; revenue)&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;%SalesDate= {"[%SalesDate] &amp;gt;= date([CampaignStartDate]) &amp;lt;= date([CampaignEndDate])"}&amp;gt;}&amp;nbsp; revenue)&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;%SalesDate &amp;gt;= date([CampaignStartDate]),&amp;nbsp; %SalesDate &amp;lt;= date([CampaignEndDate])"}&amp;gt;}&amp;nbsp; revenue)&lt;/P&gt;&lt;P&gt;or even &lt;/P&gt;&lt;P&gt;sum({$&amp;lt;%SalesDate= {"[%SalesDate] &amp;gt;= date([CampaignStartDate])"}&amp;gt;}&amp;nbsp; revenue)&lt;/P&gt;&lt;P&gt;but neither seems to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope someone can give me a hint.&lt;/P&gt;&lt;P&gt;Thx in advance, &lt;/P&gt;&lt;P&gt;Markus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 11:46:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Set-Analysis/m-p/245916#M93716</guid>
      <dc:creator />
      <dc:date>2011-08-03T11:46:59Z</dc:date>
    </item>
    <item>
      <title>Need help with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Set-Analysis/m-p/245917#M93717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No Need to apologize for your English skills, you did very well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My suggestion for you is to create an intermediate table between the campaign table and the fact table using IntervalMatch(). You will need to use the Help files to get the syntax for the extended properties that allow you to not only qualify the date range but also the foreign key value. from what you listed in your post I think it would look something like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: italic;"&gt;CampaignLink:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: italic;"&gt;IntervalMatch([date of sale], productid) Load CampaignStartDate, CampaignEndDate,&amp;nbsp; ProductID as productid Resident campaign;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: italic;"&gt;Please treat this as pseudo-code, it will take some trial and error to get it working, you will most likely end up with a synthetic table for the CampaignStartDate and campaignEndDate but this is one of of the cases where I would consider leaving it in the model.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: italic;"&gt;The trick here is that you cannot join the campaign link to your fact table because you will likely cause duplication in your fact table but by leaving it as a separate table you should be able to show totals for each campaign and not double count in the totals.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: italic;"&gt;Good Luck&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: italic;"&gt;Chris&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 12:06:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Set-Analysis/m-p/245917#M93717</guid>
      <dc:creator>chriscammers</dc:creator>
      <dc:date>2011-08-03T12:06:09Z</dc:date>
    </item>
    <item>
      <title>Need help with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Set-Analysis/m-p/245918#M93718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris, &lt;/P&gt;&lt;P&gt;thx for your reply. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I worked with IntervalMatch once, and usually try to avoid it whenever possible when working with large tables. From my earlier experiences i learned, that the reload times with intervalmatches gets really slow and often also cancels with errors, if the data table contains more than a million lines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And my facts table is really huge, consisting of several hundreds of millions of records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could try to solve the problem using IF expressions instead auf Set Analysis, but i heard, it should be less performant. And if you can imagine performance is really important within this application (with a file size of 3GB &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;)&lt;/P&gt;&lt;P&gt;If it doesn't work (well) i'll try your recommendation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 12:41:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Set-Analysis/m-p/245918#M93718</guid>
      <dc:creator />
      <dc:date>2011-08-03T12:41:43Z</dc:date>
    </item>
    <item>
      <title>Need help with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Set-Analysis/m-p/245919#M93719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, i solved it using&lt;/P&gt;&lt;P&gt;SUM(IF(&lt;STRONG&gt; &lt;/STRONG&gt;%SalesDate &amp;gt;= date([CampaignStartDate]) AND %SalesDate &amp;lt;= date([CampaignEndDate], revenue, 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As long as we dont select the date from the facts table, this solution works - suprising performant too.&lt;/P&gt;&lt;P&gt;This solution is actually good enough for my application, allthough that's not my favorised one, but it seems as Qlikview doesnt support set analysis comparisons with other field values. Or i just cant find the right syntax &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 16:33:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Set-Analysis/m-p/245919#M93719</guid>
      <dc:creator />
      <dc:date>2011-08-04T16:33:06Z</dc:date>
    </item>
  </channel>
</rss>

