<?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: Two Dates In A Table Set Analysis Cartesian Product in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Two-Dates-In-A-Table-Set-Analysis-Cartesian-Product/m-p/23793#M1616</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From what I see and understand... I don't think that this is possible using set analysis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jun 2018 01:51:44 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-06-14T01:51:44Z</dc:date>
    <item>
      <title>Two Dates In A Table Set Analysis Cartesian Product</title>
      <link>https://community.qlik.com/t5/App-Development/Two-Dates-In-A-Table-Set-Analysis-Cartesian-Product/m-p/23792#M1615</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 the following data model that can't currently be changed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="205123" alt="DataModel.png" class="jive-image image-3" height="134" src="https://community.qlik.com/legacyfs/online/205123_DataModel.png" style="height: 133.848px; width: 650px;" width="650" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would like to do is sum up a field in the UnderwritingClaimsData table whenever the %UnderwritingDate is Equal to the selected Earnings Date.&amp;nbsp; Here is my set analysis:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;SUM({&amp;lt;[%UnderwritingDate] = [Earnings Date] &amp;gt;} [xxx])&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works fine when one Earnings Date is selected.&amp;nbsp; But when multiple Earnings Dates Are Selected and the data is displayed in the table I get a cartesian product where the numbers make no sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="205121" alt="DataModel2.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/205121_DataModel2.png" style="height: 261px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way in set analysis to make the table ignore all the rows where Earnings Date != %UnderwritingDate?&amp;nbsp; I can do it by creating an If Statement but it is incredibly slow and was wondering if there is a magic way in Set Analysis to accomplish the same thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2018 20:52:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Two-Dates-In-A-Table-Set-Analysis-Cartesian-Product/m-p/23792#M1615</guid>
      <dc:creator>tdudley0302</dc:creator>
      <dc:date>2018-06-13T20:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Two Dates In A Table Set Analysis Cartesian Product</title>
      <link>https://community.qlik.com/t5/App-Development/Two-Dates-In-A-Table-Set-Analysis-Cartesian-Product/m-p/23793#M1616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From what I see and understand... I don't think that this is possible using set analysis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2018 01:51:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Two-Dates-In-A-Table-Set-Analysis-Cartesian-Product/m-p/23793#M1616</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-14T01:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: Two Dates In A Table Set Analysis Cartesian Product</title>
      <link>https://community.qlik.com/t5/App-Development/Two-Dates-In-A-Table-Set-Analysis-Cartesian-Product/m-p/23794#M1617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In general you could refer the selections from one field within the set analysis, for example with p() and/or e(), like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;SUM({&amp;lt;[%UnderwritingDate] = &lt;STRONG&gt;p(&lt;/STRONG&gt;[Earnings Date]&lt;STRONG&gt;)&lt;/STRONG&gt; &amp;gt;} [xxx])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;But I doubt that this will work in your case because you mentioned cartesian results within your table which hints that the associations between these tables/fields aren't suitable for this kind of query. Just to have a connection between tables doesn't mean that you could combine each fields from them in a table and get the right results. I assume you need to rethink your datamodel ... probably in the direction of merging tables or some table-parts instead of linking them through bridge-tables.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;- Marcus&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2018 06:49:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Two-Dates-In-A-Table-Set-Analysis-Cartesian-Product/m-p/23794#M1617</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-06-14T06:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Two Dates In A Table Set Analysis Cartesian Product</title>
      <link>https://community.qlik.com/t5/App-Development/Two-Dates-In-A-Table-Set-Analysis-Cartesian-Product/m-p/23795#M1618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just a thought why don't you create flag in back end.&lt;/P&gt;&lt;P&gt;Try to combine all table and convert data model to one table then create flag field and use that field in set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2018 07:11:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Two-Dates-In-A-Table-Set-Analysis-Cartesian-Product/m-p/23795#M1618</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2018-06-14T07:11:41Z</dc:date>
    </item>
  </channel>
</rss>

