<?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 Qlik Sense - Set Analysis Intersection Issue - Duplicates and Table Order in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Set-Analysis-Intersection-Issue-Duplicates-and-Table/m-p/1305955#M27787</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm experiencing some odd behavior and am wondering if anyone can possibly explain why I'm getting the results that I am.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Premise&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We have assets that come from various sources (called "Views" within the app). We match them based on certain criteria and then show the intersections via a Venn Diagram extension (image attached). This extension uses particular formulas to calculate the count of distinct assets in each section/intersection. Then, we have an Audittable that lists out, by asset, which fields have discrepancies between the original sources. Lastly, there are additional fields that I need to add to the main data table, so I load the entire table, add the needed fields, delete the original table, and then rename the new table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've simplified the dataset and just provided the relevant data/script in the attached QVF file. I've duplicated the data and script for the four scenarios below as well as the visualizations that display the needed values. The KPIs are exactly the same - only varying to account for the various datasets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="text-decoration: underline;"&gt;Scenario 1 - No Duplicates in Audit Table&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;After narrowing down the issue to only occuring when there were duplicates in the Audit table, I created a dataset that did not have duplicates.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;Results:&lt;/SPAN&gt; The KPIs are correct, but the scenario is unlikely. There are almost always duplicate AssetID values in the Audit table because there are multiple discrepancies in the source datasets.&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 style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="text-decoration: underline;"&gt;Scenario 2 - Duplicates in Audit&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Scenario 2 is exactly the same as Scenario 1, but there is a duplicate AssetID in the Audit table rather than two distinct values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;Results:&lt;/SPAN&gt; The KPIs are incorrect. They only display results for AssetIDs in the Audit table, not the entire dataset.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="text-decoration: underline;"&gt;Scenario 3 - Duplicates in Audit - Reload Main Data Table after Audit&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Scenario 3 is exactly the same as Scenario 2, but I switched the code segments to reload the main data table before the Audit table was loaded.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;Results:&lt;/SPAN&gt; The KPIs are correct. I've switched my code to follow this scenario, but I would like to understand why it works when Scenario 2 doesn't.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="text-decoration: underline;"&gt;Scenario 4 - Duplicates in Audit - All AssetIDs in Audit Table&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Scenario 4 is exactly the same as Scenario 2, but I added all AssetIDs to the Audit table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;Results:&lt;/SPAN&gt; The KPIs are correct. This scenario is okay, but I'd prefer to just have the applicable AssetIDs in the Audit table to save on system resources.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Overall, I'm just trying to find an explanation as to why the intersections for Scenario 2 don't work while they do for the other scenarios. It seems to have something to do with duplicates and/or table numbers. I read somewhere that intersections in set analysis don't work when the data is in the same table, but I also tried fully removing the Audit table and the formulas worked perfectly fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Any help will be appreciated. I'm running Qlik Sense 3.2 SR2 for reference.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Justin&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Jun 2017 16:50:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-06-16T16:50:40Z</dc:date>
    <item>
      <title>Qlik Sense - Set Analysis Intersection Issue - Duplicates and Table Order</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Set-Analysis-Intersection-Issue-Duplicates-and-Table/m-p/1305955#M27787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm experiencing some odd behavior and am wondering if anyone can possibly explain why I'm getting the results that I am.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Premise&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We have assets that come from various sources (called "Views" within the app). We match them based on certain criteria and then show the intersections via a Venn Diagram extension (image attached). This extension uses particular formulas to calculate the count of distinct assets in each section/intersection. Then, we have an Audittable that lists out, by asset, which fields have discrepancies between the original sources. Lastly, there are additional fields that I need to add to the main data table, so I load the entire table, add the needed fields, delete the original table, and then rename the new table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've simplified the dataset and just provided the relevant data/script in the attached QVF file. I've duplicated the data and script for the four scenarios below as well as the visualizations that display the needed values. The KPIs are exactly the same - only varying to account for the various datasets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="text-decoration: underline;"&gt;Scenario 1 - No Duplicates in Audit Table&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;After narrowing down the issue to only occuring when there were duplicates in the Audit table, I created a dataset that did not have duplicates.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;Results:&lt;/SPAN&gt; The KPIs are correct, but the scenario is unlikely. There are almost always duplicate AssetID values in the Audit table because there are multiple discrepancies in the source datasets.&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 style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="text-decoration: underline;"&gt;Scenario 2 - Duplicates in Audit&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Scenario 2 is exactly the same as Scenario 1, but there is a duplicate AssetID in the Audit table rather than two distinct values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;Results:&lt;/SPAN&gt; The KPIs are incorrect. They only display results for AssetIDs in the Audit table, not the entire dataset.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="text-decoration: underline;"&gt;Scenario 3 - Duplicates in Audit - Reload Main Data Table after Audit&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Scenario 3 is exactly the same as Scenario 2, but I switched the code segments to reload the main data table before the Audit table was loaded.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;Results:&lt;/SPAN&gt; The KPIs are correct. I've switched my code to follow this scenario, but I would like to understand why it works when Scenario 2 doesn't.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="text-decoration: underline;"&gt;Scenario 4 - Duplicates in Audit - All AssetIDs in Audit Table&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Scenario 4 is exactly the same as Scenario 2, but I added all AssetIDs to the Audit table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;Results:&lt;/SPAN&gt; The KPIs are correct. This scenario is okay, but I'd prefer to just have the applicable AssetIDs in the Audit table to save on system resources.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Overall, I'm just trying to find an explanation as to why the intersections for Scenario 2 don't work while they do for the other scenarios. It seems to have something to do with duplicates and/or table numbers. I read somewhere that intersections in set analysis don't work when the data is in the same table, but I also tried fully removing the Audit table and the formulas worked perfectly fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Any help will be appreciated. I'm running Qlik Sense 3.2 SR2 for reference.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Justin&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 16:50:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Set-Analysis-Intersection-Issue-Duplicates-and-Table/m-p/1305955#M27787</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-16T16:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Set Analysis Intersection Issue - Duplicates and Table Order</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Set-Analysis-Intersection-Issue-Duplicates-and-Table/m-p/1305956#M27788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure I understand the issue, but using this expression works for database 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count({&amp;lt;[AssetID2]=P({&amp;lt;[View2] = {"Manufacturer"}&amp;gt;} [AssetID2])*E({&amp;lt;[View2] = {"Customer"}&amp;gt;} [AssetID2])*E({&amp;lt;[View2] = {"Collector"}&amp;gt;} [AssetID2])&amp;gt;}&amp;nbsp; DISTINCT [AssetID2])&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 17:22:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Set-Analysis-Intersection-Issue-Duplicates-and-Table/m-p/1305956#M27788</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-16T17:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Set Analysis Intersection Issue - Duplicates and Table Order</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Set-Analysis-Intersection-Issue-Duplicates-and-Table/m-p/1305957#M27789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That does work; thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know why removing the extra angle brackets/pieces of set analysis works compared to having them? That's the main thing I'm looking for - why doesn't the formula that I am using work only in Scenario 2?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Justin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 18:17:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Set-Analysis-Intersection-Issue-Duplicates-and-Table/m-p/1305957#M27789</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-16T18:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Set Analysis Intersection Issue - Duplicates and Table Order</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Set-Analysis-Intersection-Issue-Duplicates-and-Table/m-p/1305958#M27790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To tell you the truth, I have no idea.... but it could very well be a bug....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 18:18:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Set-Analysis-Intersection-Issue-Duplicates-and-Table/m-p/1305958#M27790</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-16T18:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Set Analysis Intersection Issue - Duplicates and Table Order</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Set-Analysis-Intersection-Issue-Duplicates-and-Table/m-p/1305959#M27791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Okay, no problem. I'll leave this open for a little bit longer to see if anyone can provide an explanation, but thank you so much for looking into it. I'll be updating the formula for the extension to use yours. And if I don't get an explanation for why, I'll mark yours as the correct answer. Thank you again! &lt;/SPAN&gt;&lt;SPAN class="emoticon-inline emoticon_happy" style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/SPAN&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 18:21:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Set-Analysis-Intersection-Issue-Duplicates-and-Table/m-p/1305959#M27791</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-16T18:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Set Analysis Intersection Issue - Duplicates and Table Order</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Set-Analysis-Intersection-Issue-Duplicates-and-Table/m-p/1305960#M27792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like a plan... and I would be interested in knowing why it did not work...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 18:24:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Set-Analysis-Intersection-Issue-Duplicates-and-Table/m-p/1305960#M27792</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-16T18:24:17Z</dc:date>
    </item>
  </channel>
</rss>

